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
| 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
| 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
| 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
| <%=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
| #!/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
| 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
| class Cart < ActiveRecord::Base | |
| has_many :items, :class_name => 'CartItem', :dependent => :destroy | |
| # ... | |
| def empty! | |
| items.each(&:destroy) | |
| self | |
| 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
| module Matchers | |
| class HaveNotice | |
| def initialize(contents, scope) | |
| @contents, @scope = contents, scope | |
| end | |
| def matches?(response) | |
| response.should @scope.have_tag('div.notice', @contents) | |
| 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 'A Collection' do | |
| subject { Collection.new } | |
| action { clear } | |
| should_return_self | |
| should_clear_itself | |
| end |