spec/license_spec.rb in ronin-1.5.0 vs spec/license_spec.rb in ronin-1.5.1
- old
+ new
@@ -1,19 +1,25 @@
require 'spec_helper'
+
require 'ronin/license'
describe License do
- it "should require name and description attributes" do
- license = License.new
- license.should_not be_valid
+ describe "validations" do
+ it "should require name and description attributes" do
+ expect(subject).not_to be_valid
- license.name = 'joke'
- license.should_not be_valid
+ subject.name = 'joke'
+ expect(subject).not_to be_valid
- license.description = "yep, it's a joke."
- license.should be_valid
+ subject.description = "yep, it's a joke."
+ expect(subject).to be_valid
+ end
end
- it "should provide built-in licenses"do
- License.cc_by.should_not be_nil
+ describe "predefined licenses" do
+ subject { described_class }
+
+ it "should provide built-in licenses"do
+ expect(subject.cc_by).not_to be_nil
+ end
end
end