Sha256: 4edf28947d603ea459d51dac7fedcfcd6b74a0dfdc2a58ddf8bf5e2c1e42e095
Contents?: true
Size: 604 Bytes
Versions: 5
Compression:
Stored size: 604 Bytes
Contents
require File.dirname(__FILE__) + '/spec_helper' module SharedBehaviourExample class OneThing def what_things_do "stuff" end end class AnotherThing def what_things_do "stuff" end end describe "All Things", :shared => true do it "should do what things do" do @thing.what_things_do.should == "stuff" end end describe OneThing do it_should_behave_like "All Things" before(:each) { @thing = OneThing.new } end describe AnotherThing do it_should_behave_like "All Things" before(:each) { @thing = AnotherThing.new } end end
Version data entries
5 entries across 5 versions & 1 rubygems