Skip to content

Commit

Permalink
Fix TextWidth spec for Ruby 1.9.3
Browse files Browse the repository at this point in the history
The test was failing since `#lines` returns an Enumerator in 1.9.3.
Ensure it is an array.
  • Loading branch information
sds committed Dec 23, 2015
1 parent bd7aa39 commit ef693fb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion spec/overcommit/hook/commit_msg/text_width_spec.rb
Expand Up @@ -6,7 +6,7 @@
subject { described_class.new(config, context) }

before do
context.stub(:commit_message_lines).and_return(commit_msg.lines)
context.stub(:commit_message_lines).and_return(commit_msg.lines.to_a)
context.stub(:empty_message?).and_return(commit_msg.empty?)
end

Expand Down

0 comments on commit ef693fb

Please sign in to comment.