spec/task_spec.rb in ruby-yasm-0.2.0 vs spec/task_spec.rb in ruby-yasm-0.2.1
- old
+ new
@@ -15,56 +15,56 @@
task = Task.new
task.target!(:amd64).should == true
end
- it "should raise RuntimeError when passed unknown targets" do
+ it "should raise ArgumentError when passed unknown targets" do
task = Task.new
lambda {
task.target! :lol
- }.should raise_error(RuntimeError)
+ }.should raise_error(ArgumentError)
end
describe "x86" do
- before(:all) do
- @task = Task.new { |task| task.target! :x86 }
+ subject do
+ Task.new { |task| task.target! :x86 }
end
it "should set the arch value" do
- @task.arch.should == :x86
+ subject.arch.should == :x86
end
it "should set the machine value" do
- @task.machine.should == :x86
+ subject.machine.should == :x86
end
end
describe "amd64" do
- before(:all) do
- @task = Task.new { |task| task.target! :amd64 }
+ subject do
+ Task.new { |task| task.target! :amd64 }
end
it "should set the arch value" do
- @task.arch.should == :x86
+ subject.arch.should == :x86
end
it "should set the machine value" do
- @task.machine.should == :amd64
+ subject.machine.should == :amd64
end
end
describe "lc3b" do
- before(:all) do
- @task = Task.new { |task| task.target! :lc3b }
+ subject do
+ Task.new { |task| task.target! :lc3b }
end
it "should set the arch value" do
- @task.arch.should == :lc3b
+ subject.arch.should == :lc3b
end
it "should set the machine value" do
- @task.machine.should == :lc3b
+ subject.machine.should == :lc3b
end
end
end
end