spec/rake/funnel/tasks/assembly_version_spec.rb in rake-funnel-0.18.0 vs spec/rake/funnel/tasks/assembly_version_spec.rb in rake-funnel-0.19.0
- old
+ new
@@ -1,12 +1,12 @@
include Rake
include Rake::Funnel::Support
describe Rake::Funnel::Tasks::AssemblyVersion do
- before {
+ before do
Task.clear
- }
+ end
describe 'defaults' do
its(:name) { should == :version }
its(:language) { should == :cs }
its(:source) { should == :FromVersionFiles }
@@ -21,25 +21,25 @@
end
describe 'execution' do
let(:writer) { instance_double(AssemblyVersionWriter).as_null_object }
- before {
+ before do
allow(AssemblyVersionWriter).to receive(:new).and_return(writer)
- }
+ end
- subject {
+ subject do
described_class.new(:name) do |t|
- t.language = [:cs, :vb]
+ t.language = %i(cs vb)
t.source = %w(one two)
t.source_args = { foo: 42 }
t.target_path = 'will not work'
end
- }
+ end
- before {
+ before do
Task[subject.name].invoke
- }
+ end
it 'should pass source and source_args' do
expect(AssemblyVersionWriter).to have_received(:new).with(subject.source, subject.source_args)
end