Skip to content

Commit

Permalink
Fixed the expectation for override failure message as it has changed.
Browse files Browse the repository at this point in the history
  • Loading branch information
parndt committed Jul 3, 2012
1 parent 9989ead commit 13321ee
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions core/spec/lib/refinery/cli_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
context "when called with no args" do
it "shows info message" do
msg = capture(:stdout) { rake["refinery:override"].invoke }
msg.should match("You didn't specify anything to override. Here are some examples:")

msg.should match("You didn't specify anything valid to override. Here are some examples:")
msg.should match("rake refinery:override view=pages/home")
msg.should match("rake refinery:override view=refinery/pages/home")
msg.should match(%r{rake refinery:override view=\*\*/\*menu})
Expand All @@ -33,18 +33,18 @@
context "specified file doesn't exist" do
it "shows message" do
ENV[env] = "non-existent"

msg = capture(:stdout) { rake["refinery:override"].invoke }

msg.should eq(not_found_message)
end
end

context "specified file exist" do
let (:file_name) do
let (:file_name) do
Dir.entries(file_location).reject { |e| e =~ %r{^\.+} || e !~ %r{\..+} }.first
end

after do
FileUtils.rm_f(Rails.root.join(copied_file_location))
ENV[env] = nil
Expand Down

0 comments on commit 13321ee

Please sign in to comment.