forked from jasmine/jasmine-gem
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix init command when a Rakefile is already present.
Spec used to miss the bug because rake was required by an earlier test, so I split this spec in a separate file.
- Loading branch information
Showing
3 changed files
with
25 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
desc "A flunk task that does not want to be trampled" | ||
task :jasmine_flunk do | ||
nil | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
require File.expand_path(File.join(File.dirname(__FILE__), "spec_helper")) | ||
|
||
describe "Jasmine command line tool" do | ||
context "when rake has not been required yet" do | ||
before :each do | ||
temp_dir_before | ||
Dir::chdir @tmp | ||
end | ||
|
||
after :each do | ||
temp_dir_after | ||
end | ||
|
||
it "should append to an existing Rakefile" do | ||
FileUtils.cp("#{@old_dir}/spec/fixture/Rakefile", @tmp) | ||
output = capture_stdout { Jasmine::CommandLineTool.new.process ["init"] } | ||
output.should =~ /Jasmine has been installed with example specs./ | ||
end | ||
end | ||
end |