-
-
Save udzura/3161776 to your computer and use it in GitHub Desktop.
unDRY rspec code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe Object do | |
context "extented with MyModule" do | |
before(:all){ subject.extend(MyModule) } | |
it "should define #some_method" do | |
subject.should respond_to(:some_method) | |
end | |
end | |
end | |
describe Class do | |
context "extented with MyModule" do | |
before(:all){ subject.extend(MyModule) } | |
it "should define #some_method" do | |
subject.should respond_to(:some_method) | |
end | |
it "should also define #special_method_for_class" do | |
subject.should respond_to(:special_method_for_class) | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment