Sha256: cb40634436888d6836dd25d207eb63df90178a919166a3d6f8ec464f87710d49

Contents?: true

Size: 1.18 KB

Versions: 111

Compression:

Stored size: 1.18 KB

Contents

describe "Xruby" do

  #https://www.pivotaltracker.com/story/show/3979550  
  it "should compilebug3979550" do
    #[:action => :back] - Does not compile
    [{:action => :back}]
  end
  
  #https://www.pivotaltracker.com/story/show/4365686
  def test_method(p)
    p == 1 || p == 2
  end

  it "if with function parameters" do
    test = false
    #if test_method 1 and test_method 2
    if test_method( 1 ) and test_method 2
        test = true
    end
    
    test.should == true
  end

  #https://www.pivotaltracker.com/story/show/4528270
  it "unary priority" do
    s = "123"
    #res = -s.to_i - it does not work
    res = -(s.to_i)
    res.should == -123
  end

  #https://www.pivotaltracker.com/story/show/4765453    
  it "should assign hash" do
    test = {"1"=>"a", "2"=>"b"}
    attrs = test.each do |n, v|
      test[n] = v
    end
    
    #attrs is array of keys here
    #attrs.is_a?(Hash).should == true
  end
  
=begin
  def elsif_test
    cond = 'false'
    res = false
	if cond == 'true'
		res = false
	elsif
	    res = true
	end
	
	res.should == true
	
    cond = 'true'
    res = false
	if cond == 'true'
		res = true
	elsif
	    res = false
	end
	
	res.should == true
	
  end
=end 
end

Version data entries

111 entries across 111 versions & 2 rubygems

Version Path
rhodes-7.6.0 spec/phone_spec/app/spec/xruby_spec.rb
rhodes-7.5.1 spec/phone_spec/app/spec/xruby_spec.rb
rhodes-7.4.1 spec/phone_spec/app/spec/xruby_spec.rb
rhodes-7.1.17 spec/phone_spec/app/spec/xruby_spec.rb
rhodes-6.2.0 spec/phone_spec/app/spec/xruby_spec.rb
rhodes-6.0.11 spec/phone_spec/app/spec/xruby_spec.rb
rhodes-5.5.18 spec/phone_spec/app/spec/xruby_spec.rb
rhodes-5.5.17 spec/phone_spec/app/spec/xruby_spec.rb
rhodes-5.5.15 spec/phone_spec/app/spec/xruby_spec.rb
rhodes-5.5.0.22 spec/phone_spec/app/spec/xruby_spec.rb
rhodes-5.5.2 spec/phone_spec/app/spec/xruby_spec.rb
rhodes-5.5.0.7 spec/phone_spec/app/spec/xruby_spec.rb
rhodes-5.5.0.3 spec/phone_spec/app/spec/xruby_spec.rb
rhodes-5.5.0 spec/phone_spec/app/spec/xruby_spec.rb
tauplatform-1.0.3 spec/phone_spec/app/spec/xruby_spec.rb
tauplatform-1.0.2 spec/phone_spec/app/spec/xruby_spec.rb
tauplatform-1.0.1 spec/phone_spec/app/spec/xruby_spec.rb
rhodes-3.5.1.12 spec/phone_spec/app/spec/xruby_spec.rb
rhodes-3.3.5 spec/phone_spec/app/spec/xruby_spec.rb
rhodes-3.4.2 spec/phone_spec/app/spec/xruby_spec.rb