removed rails tests and total rails itegration

This commit is contained in:
Scott Davis 2011-12-20 22:25:30 -05:00
parent 829d44f581
commit 16fff73ed7
4 changed files with 1 additions and 122 deletions

View File

@ -1,4 +1,4 @@
%w(stand_alone rails merb).each do |lib| %w(stand_alone merb).each do |lib|
require "compass/app_integration/#{lib}" require "compass/app_integration/#{lib}"
end end

View File

@ -1,51 +0,0 @@
require 'test_helper'
require 'fileutils'
require 'compass'
require 'compass/exec'
require 'timeout'
class RailsIntegrationTest < Test::Unit::TestCase
include Compass::CommandLineHelper
include Compass::IoHelper
include Compass::RailsHelper
def setup
Compass.reset_configuration!
end
def test_rails_install
within_tmp_directory do
begin
generate_rails_app_directories("compass_rails")
Dir.chdir "compass_rails" do
compass(*%w(init rails --trace --boring .)) do |responder|
responder.respond_to %r{^\s*Is this OK\? \(Y/n\)\s*$}, :with => "Y"
responder.respond_to %r{^\s*Emit compiled stylesheets to public/stylesheets/compiled/\? \(Y/n\)\s*$}, :with => "Y"
end
# puts ">>>#{@last_result}<<<"
assert_action_performed :create, "./app/stylesheets/screen.scss"
assert_action_performed :create, "./config/initializers/compass.rb"
end
ensure
FileUtils.rm_rf "compass_rails"
end
end
rescue LoadError
puts "Skipping rails test. Couldn't Load rails"
rescue NotImplementedError => e
puts "Skipping rails test: #{e}"
end
def test_rails_install_with_no_dialog
within_tmp_directory do
generate_rails_app_directories("compass_rails")
Dir.chdir "compass_rails" do
compass(*%w(init rails --trace --boring --sass-dir app/stylesheets --css-dir public/stylesheets/compiled .))
assert_action_performed :create, "./app/stylesheets/screen.scss"
assert_action_performed :create, "./config/initializers/compass.rb"
end
end
rescue LoadError
puts "Skipping rails test. Couldn't Load rails"
end
end

View File

@ -1,20 +0,0 @@
# XXX This file isn't in use at the moment, but will be used to help test
# XXX deep rails integration of compass features.
need_gems = false
# allows testing with edge Rails by creating a test/rails symlink
RAILS_ROOT = linked_rails = File.dirname(__FILE__) + '/rails'
RAILS_ENV = 'test'
if File.exists?(linked_rails) && !$:.include?(linked_rails + '/activesupport/lib')
puts "[ using linked Rails ]"
$:.unshift linked_rails + '/activesupport/lib'
$:.unshift linked_rails + '/actionpack/lib'
else
need_gems = true
end
require 'rubygems' if need_gems
require 'action_controller'
require 'action_view'

View File

@ -1,50 +0,0 @@
require 'test_helper'
require 'compass'
require 'stringio'
class ConfigurationTest < Test::Unit::TestCase
setup do
Compass.reset_configuration!
end
after do
Compass.reset_configuration!
end
def test_defaults
contents = StringIO.new(<<-CONFIG)
project_type = :rails
CONFIG
config = Compass.configuration_for(contents, "config/compass.rb")
Compass.add_project_configuration(config, :project_type => "rails")
assert_equal 'public/images', Compass.configuration.images_dir
assert_equal 'public/stylesheets', Compass.configuration.css_dir
assert_equal 'public/fonts', Compass.configuration.fonts_dir
assert_equal '/', Compass.configuration.http_path
assert_equal '/images', Compass.configuration.http_images_path
assert_equal '/stylesheets', Compass.configuration.http_stylesheets_path
assert_equal '/fonts', Compass.configuration.http_fonts_path
# Other default values must wait until I have a better idea of how to mock Sass::Util.app_geq
end
def test_http_path_change
contents = StringIO.new(<<-CONFIG)
project_type = :rails
http_path = "/test/alternative_path"
CONFIG
config = Compass.configuration_for(contents, "config/compass.rb")
Compass.add_project_configuration(config, :project_type => "rails")
assert_equal '/test/alternative_path', Compass.configuration.http_path
assert_equal '/test/alternative_path/images', Compass.configuration.http_images_path
assert_equal '/test/alternative_path/stylesheets', Compass.configuration.http_stylesheets_path
assert_equal '/test/alternative_path/fonts', Compass.configuration.http_fonts_path
end
end