Sha256: ffaf1ac2d2b0af50bbcb9b84d8a446e2bc422d5a19532b3ec97d6feb7e431f4f

Contents?: true

Size: 863 Bytes

Versions: 89

Compression:

Stored size: 863 Bytes

Contents

require File.dirname(__FILE__) + '/spec_helper'

def behave_as_electric_musician
  respond_to(:read_notes, :turn_down_amp)
end

def behave_as_musician
  respond_to(:read_notes)
end

module BehaveAsExample
  
  class BluesGuitarist
    def read_notes; end
    def turn_down_amp; end
  end
  
  class RockGuitarist
    def read_notes; end
    def turn_down_amp; end
  end
  
  class ClassicGuitarist
    def read_notes; end
  end
  
  describe BluesGuitarist do
    it "should behave as guitarist" do
      BluesGuitarist.new.should behave_as_electric_musician
    end
  end

  describe RockGuitarist do
    it "should behave as guitarist" do
      RockGuitarist.new.should behave_as_electric_musician
    end
  end

  describe ClassicGuitarist do
    it "should not behave as guitarist" do
      ClassicGuitarist.new.should behave_as_musician
    end
  end
  
end

Version data entries

89 entries across 89 versions & 13 rubygems

Version Path
jnstq-acts_as_sms-0.1.0 test/vendor/plugins/rspec/examples/pure/behave_as_example.rb
jnstq-acts_as_sms-0.1.1 test/vendor/plugins/rspec/examples/pure/behave_as_example.rb
jnstq-acts_as_sms-0.1.3 test/vendor/plugins/rspec/examples/pure/behave_as_example.rb
jnstq-acts_as_sms-0.1.4 test/vendor/plugins/rspec/examples/pure/behave_as_example.rb
newbamboo-evented-rspec-1.1.12 examples/passing/behave_as_example.rb
newbamboo-rspec-1.1.12 examples/passing/behave_as_example.rb
merb-core-1.1.3 spec10/public/webrat/test_app/gems/gems/rspec-1.1.11/examples/pure/behave_as_example.rb
merb-core-1.1.2 spec10/public/webrat/test_app/gems/gems/rspec-1.1.11/examples/pure/behave_as_example.rb
merb-core-1.1.1 spec10/public/webrat/test_app/gems/gems/rspec-1.1.11/examples/pure/behave_as_example.rb
merb-core-1.1.0 spec10/public/webrat/test_app/gems/gems/rspec-1.1.11/examples/pure/behave_as_example.rb
merb-core-1.1.0.rc1 spec10/public/webrat/test_app/gems/gems/rspec-1.1.11/examples/pure/behave_as_example.rb
merb-core-1.1.0.pre spec10/public/webrat/test_app/gems/gems/rspec-1.1.11/examples/pure/behave_as_example.rb
deckshuffler-0.0.2 vendor/plugins/rspec/examples/behave_as_example.rb
has_finder-0.1.2 spec/rails/vendor/plugins/rspec/examples/behave_as_example.rb
has_finder-0.1.1 spec/rails/vendor/plugins/rspec/examples/behave_as_example.rb
has_finder-0.1.3 spec/rails/vendor/plugins/rspec/examples/behave_as_example.rb
picolena-0.0.99 app_generators/picolena/templates/vendor/plugins/rspec/examples/pure/behave_as_example.rb
picolena-0.1.0 rails_plugins/rspec/examples/pure/behave_as_example.rb
picolena-0.1.1 rails_plugins/rspec/examples/pure/behave_as_example.rb
picolena-0.1.3 rails_plugins/rspec/examples/pure/behave_as_example.rb