New API for minitest-capybara

99 views
Skip to first unread message

Wojtek Mach

unread,
Jun 29, 2013, 11:54:53 AM6/29/13
to minites...@googlegroups.com
Hey guys,

I was working on the new API for minitest-capybara and I'm looking for some feedback. Basically I want to add better support for assert_* style testing.

Example:

    visit "/"

    assert_content "Homepage"
    page.must_have_content "Homepage"

    within ".login" do
      assert_no_content "Signed in as"
      page.must_have_no_content "Signed in as"
    end

    assert_link "Sign in"
    assert_link find(".login"), "Sign in"
    find(".login").must_have_link("Sign in")

    assert_selector 'li:first', text: "Item 1"
    page.must_have_selector 'li:first', text: "Item 1"


Also, it removes dependency of minitest-matchers.


Thanks!

Mike Moore

unread,
Jun 29, 2013, 11:59:16 AM6/29/13
to minites...@googlegroups.com
I've also been thinking about moving away from Cabybara's matchers and creating assertions and expectations instead. I would prefer to not load minitest-matchers as well. How can we help?


--
-- You received this message because you are subscribed to the Google Groups minitest-rails group. To post to this group, send email to minites...@googlegroups.com. To unsubscribe from this group, send email to minitest-rail...@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/minitest-rails?hl=en
---
You received this message because you are subscribed to the Google Groups "minitest-rails" group.
To unsubscribe from this group and stop receiving emails from it, send an email to minitest-rail...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Wojtek Mach

unread,
Jun 29, 2013, 12:04:09 PM6/29/13
to minites...@googlegroups.com
The code is already there so feel free to comment on the PR. What's more important is not to break your tests so it'd be cool if you could try this out in your apps.
Message has been deleted

Tim Griffin

unread,
Sep 5, 2013, 10:17:40 AM9/5/13
to minites...@googlegroups.com
Hi Mike;

In trying to sort through the github history of minitest-rails-capybara, I see that in the past you've brought minitest-matchers into minitest-rails-capybara. I'm wondering why you are considering moving away from them now? 

Could you elaborate on what you feel tends to be the advantage of using assertions and expectations over matchers? 

Thanks,
Tim


On Saturday, June 29, 2013 11:59:16 AM UTC-4, Mike Moore wrote:
Reply all
Reply to author
Forward
0 new messages