Skip to content

Commit

Permalink
removing some cruft from the old rspec story runner bundle... still m…
Browse files Browse the repository at this point in the history
…ore lying around :(
  • Loading branch information
bmabey committed Mar 6, 2009
1 parent bfeae9e commit eda404f
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 32 deletions.
2 changes: 1 addition & 1 deletion Support/lib/cucumber/mate/feature_helper.rb
Expand Up @@ -82,7 +82,7 @@ def goto_steps_file_with_new_steps(new_steps)
silently_create_file(@file.runner_file_path) if !File.file?(@file.runner_file_path) && request_confirmation_to_create_file(@file.runner_file_path)
steps_file = Files::StepsFile.new(@file.steps_file_path)
goto_or_create_file(steps_file.full_file_path,
:line => steps_file.new_steps_line_number,
:line => 1,
:column => 1,
:additional_content => Files::StepsFile.create_steps(new_steps, !File.file?(steps_file.full_file_path)))
end
Expand Down
13 changes: 0 additions & 13 deletions Support/lib/cucumber/mate/files/steps_file.rb
Expand Up @@ -32,19 +32,6 @@ def create_steps(steps_to_create, already_included_snippet_selection = true)

def steps_file?; true; end

# TODO - what's this for? "steps_for" is not in cucumber
def new_steps_line_number
if File.file?(full_file_path)
contents = File.read(full_file_path)

contents.split("\n").each_with_index do |line, index|
return index + 2 if line =~ /\s*steps_for/
end

return 2
end
end

def name
@name ||= super.gsub("_steps", "")
end
Expand Down
18 changes: 0 additions & 18 deletions Support/spec/cucumber/mate/files/steps_file_spec.rb
Expand Up @@ -43,24 +43,6 @@ module Files
end
end

describe "#new_steps_line_number" do
describe "when the steps_for line is at the top" do
it "should return the next line" do
@steps_file.new_steps_line_number.should == 2
end
end

describe "when the steps_for line is not at the top" do
before(:each) do
@steps_file = StepsFile.new(File.expand_path(File.join(@fixtures_path, %w[features step_definitions additional_basic_steps.rb])))
end

it "should return the line after steps_for" do
@steps_file.new_steps_line_number.should == 7
end
end
end

describe "#alternate_files_and_names" do
it "should generate a list of feature files (and names) which use this steps file" do
pending
Expand Down

0 comments on commit eda404f

Please sign in to comment.