Sha256: d512743a6479b6abded5a76f71da1b500215be134bfac62c65bc0dd7c91980d6

Contents?: true

Size: 618 Bytes

Versions: 23

Compression:

Stored size: 618 Bytes

Contents

require 'rho/mapview'

describe "MapView" do

  it "should create" do
    state = MapView.state
    state.should be_nil

    MapView.create :settings => {:map_type => 'roadmap', :region => [37, -122, 10, 10]}
    w = 5
    #w = 5 if System::get_property('platform') == 'ANDROID'
    sleep w

    state = MapView.state
    state.should_not be_nil
    state.is_a?(Hash).should == true 
    delta = 0.001
    (state[:center][:latitude] - 37.0).abs.should  < delta
    (state[:center][:longitude] - (-122.0)).abs.should  < delta

    MapView.close
    sleep 2

    state = MapView.state
    state.should be_nil
  end

end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
rhodes-2.3.0 spec/phone_spec/app/spec/mapview_spec.rb
rhodes-2.3.0.beta.3 spec/phone_spec/app/spec/mapview_spec.rb
rhodes-2.3.0.beta.2 spec/phone_spec/app/spec/mapview_spec.rb
rhodes-2.3.0.beta.1 spec/phone_spec/app/spec/mapview_spec.rb
rhodes-2.2.6 spec/phone_spec/app/spec/mapview_spec.rb
rhodes-2.2.6.beta.1 spec/phone_spec/app/spec/mapview_spec.rb
rhodes-2.2.5 spec/phone_spec/app/spec/mapview_spec.rb
rhodes-2.2.5.beta.3 spec/phone_spec/app/spec/mapview_spec.rb
rhodes-2.2.5.beta.2 spec/phone_spec/app/spec/mapview_spec.rb
rhodes-2.2.5.beta.1 spec/phone_spec/app/spec/mapview_spec.rb
rhodes-2.2.4.beta.1 spec/phone_spec/app/spec/mapview_spec.rb
rhodes-2.2.3 spec/phone_spec/app/spec/mapview_spec.rb
rhodes-2.2.3.beta.1 spec/phone_spec/app/spec/mapview_spec.rb
rhodes-2.2.2 spec/phone_spec/app/spec/mapview_spec.rb
rhodes-2.2.2.beta.1 spec/phone_spec/app/spec/mapview_spec.rb
rhodes-2.2.1 spec/phone_spec/app/spec/mapview_spec.rb
rhodes-2.2.1.beta.2 spec/phone_spec/app/spec/mapview_spec.rb
rhodes-2.2.1.beta.1 spec/phone_spec/app/spec/mapview_spec.rb
rhodes-2.2.0 spec/phone_spec/app/spec/mapview_spec.rb
rhodes-2.2.0.beta.3 spec/phone_spec/app/spec/mapview_spec.rb