1

I have a page object with the following setup:

class StudynoteShowPage < SitePrism::Page
  set_url "/studynotes{/studynote}"
end

When I use that page

ssp = StudynoteShowPage.new
ssp.load(studynote: @s1)

I get

ArgumentError:
  wrong number of arguments (given 1, expected 0)

Any ideas about that? I've already tried single and double quotes in the set_url, but that makes no difference. I can see that the addressable gem is included in my Gemfile.lock.

andreheijstek
  • 71
  • 1
  • 9

1 Answers1

1

This "should" work. Could you please check the following.

You have a version of site_prism > 2.12 (Or better > 3.0), You have addressable 2.5+

You're using Ruby 2.2+ (Better 2.5/2.6)

If you are and can re-create a SSCCE raise a Github issue (Ideally with all the code in a small clonable repo here: https://github.com/natritmeyer/site_prism/issues

We have a variety of unit tests and a couple of feature tests that validate this code works (We may have missed something though)

Luke Hill
  • 460
  • 2
  • 10
  • Thanks, I've got it to work already. Don't remember exactly how (it's long ago ...) – andreheijstek Feb 26 '19 at 21:40
  • Glad to hear things are working. I've only recently discovered that there was a SO tag for SitePrism, so I've been going through the last 20-30 issues and seeing if I can add any clarity. I've been maintaining SitePrism for around 1 year and we've released over a dozen updates, so it's definitely going to be growing. – Luke Hill Feb 27 '19 at 17:15