This file contains hidden or 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
it 'should do something' do | |
on_failure warn_that "@foo shouldn't be nil" do | |
@foo.should_not be_nil | |
end | |
end |
This file contains hidden or 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
#!/usr/bin/env ruby | |
# | |
# This file was generated by RubyGems. | |
# | |
# The application 'cucumber' is installed as part of a gem, and | |
# this file is here to facilitate running it. | |
# | |
require 'rubygems' | |
$:.unshift 'vendor/gems/cucumber-0.1.6/lib' |
This file contains hidden or 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
<%=h status %> | |
<% content_for :footer %> | |
<%=h footer %> | |
<% end %> |
This file contains hidden or 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 ProjectsController do | |
describe :get => :show, :id => '37' do | |
expects :find, :on => Project, :with => { :id => '37' }, :returns => mock_project | |
assigns :project | |
describe "mime XML" do | |
mime Mime::XML | |
# | |
end | |
end |
This file contains hidden or 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 'rubygems' | |
require 'spec' | |
class MyExampleGroup < Spec::ExampleGroup | |
before(:each) do | |
puts "in before(:each)" | |
my_custom_method | |
end | |
class << self |
This file contains hidden or 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
Scenario Outline: Religious menus | |
Given the customer is "<Religion>" | |
When he asks for the menu | |
Then he should be presented with the appropriate selection from <Pork>, <Lamb>, or <Veal> | |
Scenarios: | |
| Religion | Pork | Lamb | Veal | | |
| Christian | Y | Y | Y | | |
| Jewish | | Y | Y | | |
| Muslim | | Y | Y | |
This file contains hidden or 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 Scorecard::Score::BusinessCapacityScore,"benchmark" do | |
before do | |
@business_capacity = Scorecard::Score::BusinessCapacityScore.new | |
@business_capacity.ues = false | |
@stream_fields = @business_capacity.assistance_type_stream_fields | |
end | |
@stream_fields.each do |stream_label| | |
it "should get the stream: #{stream_label}" do |
This file contains hidden or 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 Customer, "last billing address" do | |
before do | |
@customer = Customer.generate! | |
@customer = Address.new | |
end | |
it "should be settable and gettable" do | |
@customer.last_billing_address = @account_address | |
@customer.last_billing_address.should == @account_address | |
end | |
... |
This file contains hidden or 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
Scenario "has three steps" do | |
Given "one" do | |
end | |
When "two" do | |
end | |
Then "three" do | |
end |
This file contains hidden or 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
class Game | |
attr_reader :teams | |
def initialize | |
@teams = Array.new | |
end | |
def started? | |
false |