mirror of
https://github.com/discourse/discourse.git
synced 2024-11-28 15:04:38 +08:00
24 lines
518 B
Ruby
24 lines
518 B
Ruby
require 'spec_helper'
|
|
require_dependency 'plugin/metadata'
|
|
|
|
describe Plugin::Metadata do
|
|
context "parse" do
|
|
it "correctly parses plugin info" do
|
|
metadata = Plugin::Metadata.parse <<TEXT
|
|
# name: plugin-name
|
|
# about: about: my plugin
|
|
# version: 0.1
|
|
# authors: Frank Zappa
|
|
|
|
some_ruby
|
|
TEXT
|
|
|
|
expect(metadata.name).to eq("plugin-name")
|
|
expect(metadata.about).to eq("about: my plugin")
|
|
expect(metadata.version).to eq("0.1")
|
|
expect(metadata.authors).to eq("Frank Zappa")
|
|
end
|
|
end
|
|
|
|
end
|