Skip to content

Instantly share code, notes, and snippets.

@daneharrigan
Created June 22, 2011 03:19
Show Gist options
  • Save daneharrigan/1039444 to your computer and use it in GitHub Desktop.
Save daneharrigan/1039444 to your computer and use it in GitHub Desktop.
to load or not to load
# pros
# - leverages the existing test helpers
# - doesn't requiring creating an extra rails environment for a few tests
# - keeps the tests running in one suite
#
# cons
# - cant load multiple environments at the class level, will error if tried
# - will need to be revised if more than one class level load is needed
# - loaded environment lives for the whole lifecycle of the test suite
#
class SassRailsLoggerTest < Sass::Rails::TestCase
within_rails_app "scss_project" do |environment|
load environment
test "scss project uses the sass-rails logger" do
assert Sass::logger.is_a?(Sass::Rails::Logger)
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment