Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Failing test - on_request hook #432

jamonholmgren opened this Issue · 3 comments

2 participants


    it "should called on_request hook" do

      wait_for_change @webscreen, 'on_request' do
        @webscreen.on_request_args[0].is_a?(NSURLRequest).should == true
        # on_request is called when @webscreen request for some iframe
        @webscreen.on_request_args[0].URL.absoluteString.should =~ %r|https?://.*|

This test consistently fails in master and edge for me.

when use on_request hook by web brigde rpc
  - should called on_request hook
 [✗] This test has not passed: FAILED - true.!() failed!
 [FAILED - true.!() failed]
 BACKTRACE: Bacon::Error: true.!() failed
    spec.rb:698:in `satisfy:': when use on_request hook by web brigde rpc - should called on_request hook
    spec.rb:712:in `method_missing:'
    spec.rb:438:in `execute_block'
    spec.rb:402:in `run_postponed_block:'

@ainame , you wrote this test, any ideas?

@jamonholmgren jamonholmgren added the bug label

Huum, I'll check it, but i don't know recently updates of ProMotion and RubyMotion.


In spec/helpers/web_screen.rb, TestWebScreen implement load_finished method as a not only hook of PM::WebScreen but also as attr_accessor.

It should maybe invalid, because load_finished method have two roles.
1. implementation of hook
2. checking of changes for loading status.

Then, it maybe success spec by chance in early rubymotion or promotion environment.

I will create a pull request for this issue to separate to two method for those.

261 specifications (462 requirements), 0 failures, 0 errors


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.