spec/pymainclass_spec.rb in rubypython-0.3.1 vs spec/pymainclass_spec.rb in rubypython-0.3.2
- old
+ new
@@ -1,25 +1,32 @@
require File.dirname(__FILE__) + '/spec_helper.rb'
describe RubyPython::PyMainClass do
include TestConstants
- include RubyPythonStartStop
+ before do
+ RubyPython.start
+ end
+
+ after do
+ RubyPython.stop
+ end
+
subject { RubyPython::PyMain }
- it "should delegate to builtins" do
+ it "delegates to builtins" do
subject.float(AnInt).rubify.should == AnInt.to_f
end
- it "should handle block syntax" do
+ it "handles block syntax" do
subject.float(AnInt) {|f| f.rubify*2}.should == (AnInt.to_f * 2)
end
- it "should allow attribute access" do
+ it "allows attribute access" do
subject.main.__name__.rubify.should == '__main__'
end
- it "should allow global variable setting" do
+ it "allows global variable modification" do
subject.x = 2
subject.x.rubify.should == 2
end
end