I have a **Sinatra** application (trying to learn basic testing with rspec) and want to write a test for this method:

```
 # application_controller.rb
def active_page?(path)
  request.path_info == path
end

```

my test is

```
require File.expand_path '../../spec_helper.rb', __FILE__

describe "My Application Controller" do
  it "should validate the current page path" do
    get "/home"
    active_page?("/home").should eq true
  end
end

```

The error I get is

```
.F

Failures:

1) My Application Controller should validate the current page path
 Failure/Error: expect(active_page?("/home")).to be true

 ArgumentError:
   wrong number of arguments (given 0, expected 1..2)
 # /Users/deepthought/.rvm/gems/ruby-2.4.2/gems/rack-test-1.0.0/lib/rack/test.rb:116:in `request'
 # ./controllers/application_controller.rb:15:in `active_page?'
 # ./spec/controllers/application_controller_spec.rb:12:in `block (2 levels) in <top (required)>'

Finished in 0.02004 seconds (files took 0.45736 seconds to load)
1 example, 1 failure

Failed examples:

rspec ./spec/controllers/application_controller_spec.rb:10 # My Application Controller should validate the current page path

```

The method itself seems to work fine in the application, but I wanted to write a test just for learning purposes.

At first I tried:

```
expect(active_page?("/home")).to eq true

```

but I still got the same error.

How do I make this test pass?