code-spec 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.2
1
+ 0.2.3
data/code-spec.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{code-spec}
8
- s.version = "0.2.2"
8
+ s.version = "0.2.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Kristian Mandrup"]
@@ -32,7 +32,8 @@ module RSpec::RubyContentMatchers
32
32
  args_expr
33
33
  when Array
34
34
  args.inject("") do |res, arg|
35
- res << '(\s|,|\w|:)*' + arg.inspect
35
+ arg_val = (arg.kind_of?(String) && arg[0] == '#') ? arg[1..-1] : arg.inspect
36
+ res << '(\s|,|\w|:)*' + arg_val
36
37
  end
37
38
  else
38
39
  return nil
@@ -1,7 +1,7 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe 'method call matcher with args' do
4
- context "content with call hello" do
4
+ context "content with call devise" do
5
5
  call = %{
6
6
  devise :database_authenticatable, :confirmable, :recoverable, :rememberable, :trackable, :validatable
7
7
  }
@@ -10,4 +10,14 @@ describe 'method call matcher with args' do
10
10
  call.should_not have_call :devise, :args => [:confirmable, :trackable_ids]
11
11
  end
12
12
  end
13
+
14
+ context "content with call devise" do
15
+ call = %{
16
+ devise :database_authenticatable, confirm_me, :recoverable, "hello"
17
+ }
18
+ it "should have call to hello" do
19
+ call.should have_call :devise, :args => ['#confirm_me', "hello"]
20
+ call.should_not have_call :devise, :args => ['#hello']
21
+ end
22
+ end
13
23
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 2
8
- - 2
9
- version: 0.2.2
8
+ - 3
9
+ version: 0.2.3
10
10
  platform: ruby
11
11
  authors:
12
12
  - Kristian Mandrup