Sha256: c2a17513442e60593881158fdb5aea7bdec77890442d89d4dc37c8ae4bb77242
Contents?: true
Size: 1.35 KB
Versions: 2
Compression:
Stored size: 1.35 KB
Contents
require 'spec_helper' require 'rails/generators/test_case' require 'generators/less_rails_bootstrap/custom_bootstrap/custom_bootstrap_generator' class CustomBootstrapGeneratorTest < Rails::Generators::TestCase tests LessRailsBootstrap::Generators::CustomBootstrapGenerator destination Rails.root.join('tmp/generators') setup :prepare_destination def setup run_generator end test "content of custom_bootstrap.less was changed" do md5 = Digest::MD5.file(destination_root.join("app/assets/stylesheets/custom_bootstrap/custom_bootstrap.less")).hexdigest assert_equal '5df8ad55b43c4880aeda200e78285948', md5, 'Looks like content of custom_bootstrap.less was changed. Please, investigate the reason of this and fix test if these changes are appropriate.' end test "custom_bootstrap.less is generated" do assert_file(destination_root.join("app/assets/stylesheets/custom_bootstrap/custom_bootstrap.less"), /@import/) end test "variables.less is generated" do assert_file("app/assets/stylesheets/custom_bootstrap/variables.less", "// Use this file to override Twitter Bootstrap variables or define own variables.\n") end test "mixins.less is generated" do assert_file("app/assets/stylesheets/custom_bootstrap/mixins.less", "// Use this file to override Twitter Bootstrap mixins or define own mixins.\n") end end
Version data entries
2 entries across 2 versions & 2 rubygems
Version | Path |
---|---|
scc-less-rails-bootstrap-3.3.5.2 | test/cases/generators/custom_bootstrap_generator_test.rb |
less-rails-bootstrap-3.3.5.0 | test/cases/generators/custom_bootstrap_generator_test.rb |