Sha256: f7f1effb1914bb527ce487551bd9e77e9207b0b499ac97bdc98bb2661b2f4bc7

Contents?: true

Size: 746 Bytes

Versions: 41

Compression:

Stored size: 746 Bytes

Contents

module Spec
  module Story
    class StepMother
      def initialize
        @steps = StepGroup.new
      end
      
      def use(new_step_group)
        @steps << new_step_group
      end
      
      def store(type, step)
        @steps.add(type, step)
      end
      
      def find(type, unstripped_name)
        name = unstripped_name.strip
        if @steps.find(type, name).nil?
          @steps.add(type,
          Step.new(name) do
            raise Spec::Example::ExamplePendingError.new("Unimplemented step: #{name}")
          end
          )
        end
        @steps.find(type, name)
      end
      
      def clear
        @steps.clear
      end
      
      def empty?
        @steps.empty?
      end
      
    end
  end
end

Version data entries

41 entries across 41 versions & 10 rubygems

Version Path
dchelimsky-rspec-1.1.10 lib/spec/story/step_mother.rb
dchelimsky-rspec-1.1.11.1 lib/spec/story/step_mother.rb
dchelimsky-rspec-1.1.11.2 lib/spec/story/step_mother.rb
dchelimsky-rspec-1.1.11.3 lib/spec/story/step_mother.rb
dchelimsky-rspec-1.1.11.4 lib/spec/story/step_mother.rb
dchelimsky-rspec-1.1.11.5 lib/spec/story/step_mother.rb
dchelimsky-rspec-1.1.11.6 lib/spec/story/step_mother.rb
dchelimsky-rspec-1.1.11.7 lib/spec/story/step_mother.rb
dchelimsky-rspec-1.1.11 lib/spec/story/step_mother.rb
dchelimsky-rspec-stories-1.0.0 lib/spec/story/step_mother.rb
jnstq-acts_as_sms-0.1.0 test/vendor/plugins/rspec/lib/spec/story/step_mother.rb
jnstq-acts_as_sms-0.1.1 test/vendor/plugins/rspec/lib/spec/story/step_mother.rb
jnstq-acts_as_sms-0.1.3 test/vendor/plugins/rspec/lib/spec/story/step_mother.rb
jnstq-acts_as_sms-0.1.4 test/vendor/plugins/rspec/lib/spec/story/step_mother.rb
samstokes-rspec-stories-1.0.1 lib/spec/story/step_mother.rb
samstokes-rspec-stories-1.0.2 lib/spec/story/step_mother.rb
merb-core-1.1.3 spec10/public/webrat/test_app/gems/gems/rspec-1.1.11/lib/spec/story/step_mother.rb
merb-core-1.1.2 spec10/public/webrat/test_app/gems/gems/rspec-1.1.11/lib/spec/story/step_mother.rb
merb-core-1.1.1 spec10/public/webrat/test_app/gems/gems/rspec-1.1.11/lib/spec/story/step_mother.rb
merb-core-1.1.0 spec10/public/webrat/test_app/gems/gems/rspec-1.1.11/lib/spec/story/step_mother.rb