Created
October 24, 2008 23:15
-
-
Save paul/19623 to your computer and use it in GitHub Desktop.
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
require File.join(File.dirname(__FILE__), 'spec_helper.rb') | |
given 'a given' do | |
puts 'Given' | |
end | |
describe 'a spec' do | |
before do | |
puts 'Outer Before' | |
end | |
describe 'a sub-example', :given => 'a given' do | |
before do | |
puts 'Inner Before' | |
end | |
it 'should have a broken-ass order' do | |
puts 'Example' | |
end | |
end | |
end | |
# OUTPUT: | |
# % rubyee ./bin/spec -O spec/spec.opts spec/given_order_spec.rb | |
# Outer Before | |
# Given | |
# Inner Before | |
# Example | |
# . |
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
given 'one type of object exists' do; end | |
given 'a different type of object exists' do; end | |
describe 'my action' do | |
before do | |
@reponse = request('/my_action') | |
end | |
describe 'one type', :given => 'one type of object exists' do | |
it 'should have the response object here that contains one type of object' do | |
'but it does not, because the #request was performed before the :given' | |
end | |
end | |
describe 'a different type', :given => 'a different type of object exists' do | |
it 'should have the response object here that contains a different type of object' | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment