capybara_minitest_spec 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -14,6 +14,11 @@ Now you can have similar functionality while using MiniTest::Spec:
14
14
 
15
15
  page.must_have_content('Title')
16
16
 
17
+ Install
18
+ -------
19
+
20
+ gem install caypbara_minitest_spec
21
+
17
22
  Compatibility
18
23
  -------------
19
24
 
@@ -1,3 +1,3 @@
1
1
  module CapybaraMinitestSpec
2
- VERSION = '0.1.0'
2
+ VERSION = '0.1.1'
3
3
  end
@@ -1,3 +1,4 @@
1
+ require 'minitest/spec'
1
2
  require "capybara_minitest_spec/version"
2
3
 
3
4
  # Define assertions for each Capybara node matcher.
@@ -12,7 +13,7 @@ module MiniTest::Expectations
12
13
  # Define positive assertion.
13
14
  positive_assertion_name = :"assert_page_#{without_question_mark}"
14
15
  define_method positive_assertion_name do |page, *args|
15
- assert wrap(page).send(matcher_name, *args), "Matcher #{without_question_mark} failed"
16
+ assert wrap(page).send(matcher_name, *args), "Matcher failed: #{without_question_mark}"
16
17
  end
17
18
 
18
19
  # Infect positive assertion.
@@ -22,7 +23,7 @@ module MiniTest::Expectations
22
23
  # Define negative assertion.
23
24
  negative_assertion_name = :"refute_page_#{without_question_mark}"
24
25
  define_method negative_assertion_name do |page, *args|
25
- refute wrap(page).send(matcher_name, *args), "Matcher #{without_question_mark} should have failed"
26
+ refute wrap(page).send(matcher_name, *args), "Matcher should have failed: #{without_question_mark}"
26
27
  end
27
28
 
28
29
  # Infect negative assertions.
data/test/spec_helper.rb CHANGED
@@ -23,6 +23,6 @@ class Proc
23
23
  include MiniTest::Assertions
24
24
  # TODO: Replace this with a real assertion that checks the message.
25
25
  def must_raise(exception_or_message)
26
- assert_raises(MiniTest::Assertion, &self)
26
+ exception = assert_raises(MiniTest::Assertion, &self)
27
27
  end
28
28
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: capybara_minitest_spec
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.1.0
5
+ version: 0.1.1
6
6
  platform: ruby
7
7
  authors:
8
8
  - Jared Ning