spec/feature_spec.rb in jnicklas-courgette-0.0.2 vs spec/feature_spec.rb in jnicklas-courgette-0.0.3
- old
+ new
@@ -23,11 +23,24 @@
@feature.to_param.should == 'user-eats-rabbits'
end
end
describe '#to_html' do
- it "should not raise any errors" do
- lambda { @feature.to_html }.should_not raise_error
+ it "should contain the feature text" do
+ @feature.to_html.should include('In order to get that delicious feeling')
+ @feature.to_html.should include('As a user')
+ @feature.to_html.should include('I want to eat some Rabbits')
+ @feature.to_html.should include('eat a really cute rabbit')
+ @feature.to_html.should include('there is a rabbit')
+ @feature.to_html.should include('the rabbit is really cute')
+ @feature.to_html.should include('eat the rabbit')
+ @feature.to_html.should include('should feel good')
+ end
+ end
+
+ describe '#==' do
+ it "should be equal if it has the same param" do
+ @feature.should == Courgette::Feature.new(Rails.root.join('features/user_eats_rabbits.feature').to_s)
end
end
end
\ No newline at end of file