Sha256: 580c1c73c466cf0725933b695404c06ca42ae12fab68b51d062d537559e7bde9
Contents?: true
Size: 574 Bytes
Versions: 2
Compression:
Stored size: 574 Bytes
Contents
Given /^I have the following code:$/ do |code| @code = code end Given /^lines from (\d+) to (\d+) are selected$/ do |start_line, end_line| @selected_lines = [start_line.to_i, end_line.to_i] end Given /^I want them to be in the method called '(.+)'$/ do |name| @method_name = name end When /^I call 'extract method'$/ do @code = Rfactor::Code.new(@code) @new_code = @code.extract_method :name => @method_name, :start => @selected_lines[0], :end => @selected_lines[1] end Then /^the code should be:$/ do |expected| @new_code.should == expected end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
fabiokung-rfactor-0.0.1 | features/steps/code_steps.rb |
fabiokung-rfactor-0.0.2 | features/steps/code_steps.rb |