Unit test for the compass rails installer.
This commit is contained in:
parent
a9aa79d9a7
commit
8fc0c48dd5
@ -43,16 +43,23 @@ class CommandLineTest < Test::Unit::TestCase
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# def test_rails_install
|
def test_rails_install
|
||||||
# within_tmp_directory do
|
within_tmp_directory do
|
||||||
# generate_rails_app("compass_rails")
|
generate_rails_app("compass_rails")
|
||||||
# Dir.chdir "compass_rails" do
|
Dir.chdir "compass_rails" do
|
||||||
# compass "--rails"
|
compass "--rails" do |responder|
|
||||||
# end
|
responder.respond_to "Is this OK? (Y/n) ", :with => "Y"
|
||||||
# end
|
responder.respond_to "Emit compiled stylesheets to public/stylesheets/compiled? (Y/n) ", :with => "Y"
|
||||||
# rescue LoadError
|
end
|
||||||
# puts "Skipping rails test. Couldn't Load rails"
|
# puts @last_result
|
||||||
# end
|
assert_action_performed :create, "app/stylesheets/screen.sass"
|
||||||
|
assert_action_performed :create, "config/initializers/compass.rb"
|
||||||
|
assert_action_performed :create, "app/views/layouts/application.html.haml"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
rescue LoadError
|
||||||
|
puts "Skipping rails test. Couldn't Load rails"
|
||||||
|
end
|
||||||
|
|
||||||
protected
|
protected
|
||||||
def compass(*arguments)
|
def compass(*arguments)
|
||||||
@ -130,7 +137,7 @@ class CommandLineTest < Test::Unit::TestCase
|
|||||||
Compass::Exec::Compass.new(arguments).run!
|
Compass::Exec::Compass.new(arguments).run!
|
||||||
end
|
end
|
||||||
|
|
||||||
# def generate_rails_app(name)
|
def generate_rails_app(name)
|
||||||
# `rails #{name}`
|
`rails #{name}`
|
||||||
# end
|
end
|
||||||
end
|
end
|
Loading…
Reference in New Issue
Block a user