Sha256: 8d59967d158241534abcf4e9ff22e0d3c03b2577d5acac73e792ef1869ef2047

Contents?: true

Size: 565 Bytes

Versions: 14

Compression:

Stored size: 565 Bytes

Contents

require File.dirname(__FILE__) + '/spec_helper.rb'

include TestConstants

describe RubyPython::PyMainClass do
  subject { RubyPython::PyMain }

  it "should delegate to builtins" do
    subject.float(AnInt).rubify.should == AnInt.to_f
  end

  it "should handle block syntax" do
    subject.float(AnInt) {|f| f.rubify*2}.should == (AnInt.to_f * 2)
  end

  it "should allow attribute access" do
    subject.main.__name__.rubify.should == '__main__'
  end

  it "should allow global variable setting" do
    subject.x = 2
    subject.x.rubify.should == 2
  end
end

Version data entries

14 entries across 14 versions & 3 rubygems

Version Path
lokeshh_rubypython-0.7.1 spec/pymainclass_spec.rb
lokeshh_rubypython-0.7 spec/pymainclass_spec.rb
rubypython-0.6.4 spec/pymainclass_spec.rb
rubypython-0.6.3 spec/pymainclass_spec.rb
rubypython-raspi-0.1.2 spec/pymainclass_spec.rb
rubypython-raspi-0.1.1 spec/pymainclass_spec.rb
rubypython-raspi-0.1.0 spec/pymainclass_spec.rb
rubypython-0.6.2 spec/pymainclass_spec.rb
rubypython-0.6.1 spec/pymainclass_spec.rb
rubypython-0.6.0 spec/pymainclass_spec.rb
rubypython-0.5.3 spec/pymainclass_spec.rb
rubypython-0.5.2 spec/pymainclass_spec.rb
rubypython-0.5.1 spec/pymainclass_spec.rb
rubypython-0.5.0 spec/pymainclass_spec.rb