Sha256: 32267727b135b71af631c78326f6347fdabed7bf219369e6a16d85feb2e98a3c

Contents?: true

Size: 1.01 KB

Versions: 7

Compression:

Stored size: 1.01 KB

Contents

require File.expand_path(File.dirname(__FILE__) + "/../../example_helper")

describe Micronaut::Example do

  before do
    behaviour = stub('behaviour', :name => 'behaviour_name')
    @example = Micronaut::Example.new(behaviour, 'description', {}, (lambda {}))
  end
  
  describe "attr readers" do
  
    it "should have one for the parent behaviour" do
      @example.should respond_to(:behaviour)
    end
  
    it "should have one for it's description" do
      @example.should respond_to(:description)
    end
  
    it "should have one for it's options" do
      @example.should respond_to(:options)
    end
  
    it "should have one for it's block" do
      @example.should respond_to(:example_block)
    end

  end
  
  describe '#inspect' do
    
    it "should return 'behaviour_name - description'" do
      @example.inspect.should == 'behaviour_name - description'
    end
    
  end
  
  describe '#to_s' do
    
    it "should return #inspect" do
      @example.to_s.should == @example.inspect
    end
    
  end
  
end

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
rsanheim-micronaut-0.1.3.2 examples/lib/micronaut/example_example.rb
spicycode-micronaut-0.0.9 examples/lib/micronaut/example_example.rb
spicycode-micronaut-0.1.0 examples/lib/micronaut/example_example.rb
spicycode-micronaut-0.1.1 examples/lib/micronaut/example_example.rb
spicycode-micronaut-0.1.2 examples/lib/micronaut/example_example.rb
spicycode-micronaut-0.1.3 examples/lib/micronaut/example_example.rb
spicycode-micronaut-0.1.4 examples/lib/micronaut/example_example.rb