Sha256: c4df9b3f384c6d551da571f17d36cd8c8b7d166fdea469db6c0bc2a8b817ba6b
Contents?: true
Size: 943 Bytes
Versions: 5
Compression:
Stored size: 943 Bytes
Contents
require 'spec_helper' require 'rails/generators/test_case' require 'generators/zero_push/install_generator' class ZeroPush::GeneratorTest < Rails::Generators::TestCase destination File.expand_path('../tmp', __FILE__) tests ZeroPush::InstallGenerator test 'it copies the initializer' do production_token = 'production' development_token = 'development' $stdin.stubs(:gets).returns(production_token).then.returns(development_token) run_generator assert_file 'config/initializers/zero_push.rb' do |initializer| production_config = %Q|ZeroPush.auth_token = '#{production_token}'| assert(initializer.include?(production_config), "The initializer doesn't include the production configuration") development_config = %Q|ZeroPush.auth_token = '#{development_token}'| assert(initializer.include?(development_config), "The initializer doesn't include the development configuration") end end end
Version data entries
5 entries across 5 versions & 1 rubygems