Sha256: e4d7e39b23ac73c81eb51a357a4478fd044e550fdfbe756045f568d824a33bc0
Contents?: true
Size: 1.28 KB
Versions: 9
Compression:
Stored size: 1.28 KB
Contents
require 'spec_helper' SimpleCov.command_name('World') unless RUBY_VERSION.to_s < '1.9.0' describe 'World, Integration' do before(:each) do @world = CucumberAnalytics::World @world.loaded_step_patterns.clear end context 'collecting stuff' do before(:each) do @patterns = [/a defined step/, /another defined step/] @defined_steps = [CucumberAnalytics::Step.new('* a defined step'), CucumberAnalytics::Step.new('* another defined step')] @undefined_steps = [CucumberAnalytics::Step.new('* an undefined step'), CucumberAnalytics::Step.new('* another undefined step')] @patterns.each do |pattern| @world.load_step_pattern(pattern) end end it 'can collect defined steps from containers' do nested_container = double(:steps => @defined_steps) container = double(:steps => @undefined_steps, :contains => [nested_container]) @defined_steps.should =~ @world.defined_steps_in(container) end it 'can collect undefined steps from containers' do nested_container = double(:steps => @defined_steps) container = double(:steps => @undefined_steps, :contains => [nested_container]) @undefined_steps.should =~ @world.undefined_steps_in(container) end end end
Version data entries
9 entries across 9 versions & 1 rubygems