spec/instrument/control_builder_spec.rb in instrument-0.1.2 vs spec/instrument/control_builder_spec.rb in instrument-0.1.3
- old
+ new
@@ -17,37 +17,37 @@
describe Instrument::ControlBuilder, "extending another object" do
class ExtendedObject
include Instrument::ControlBuilder
end
-
+
before :all do
@extended_object = ExtendedObject.new
end
-
+
it "should enable mixins to function" do
@extended_object.image_control.class.should == ImageControl
@extended_object.select.class.should == Select
end
-
+
it "should still raise an Exception for non-existent methods" do
(lambda do
@extended_object.bogus
end).should raise_error(NoMethodError)
end
-
+
it "should respond to a normal message" do
@extended_object.should respond_to(:to_s)
end
-
+
it "should not respond to a bogus message" do
@extended_object.should_not respond_to(:bogus)
end
-
+
it "should respond to a valid control name message" do
@extended_object.should respond_to(:image_control)
end
-
+
it "should not respond to an invalid control name message" do
@extended_object.should_not respond_to(:bogus_control)
end
end