Sha256: 0ff11360aa52a0d975a0983efe7c3dc1d1c62e2ee574b81fc59494c06a4b3f9a
Contents?: true
Size: 851 Bytes
Versions: 8
Compression:
Stored size: 851 Bytes
Contents
require 'spec_helper' describe 'Settings in rake tasks' do it '#set should work' do rake { set :domain, 'localhost' } expect(rake.domain).to eq('localhost') expect(rake.settings.domain).to eq('localhost') end it '#settings ||= should work' do rake { set :version, '2' settings.version ||= '3' } expect(rake.settings.version).to eq('2') expect(rake.version).to eq('2') end it '#settings with lambdas should work' do rake { set :version, '42' set :path, lambda { "/var/www/#{version}" } } expect(rake.path).to eq("/var/www/42") expect(rake.path?).to be_truthy end it '#settings with a bang should work' do expect { rake { set :path, lambda { "/var/www/#{version!}" } } rake.path }.to raise_error(Mina::Error, /version/) end end
Version data entries
8 entries across 8 versions & 2 rubygems