discourse/spec/components/plugin/metadata_spec.rb

26 lines
603 B
Ruby
Raw Normal View History

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
# url: http://discourse.org
some_ruby
TEXT
2015-01-10 00:34:37 +08:00
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")
expect(metadata.url).to eq("http://discourse.org")
end
end
end