jasper-rails-rspec 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile ADDED
@@ -0,0 +1,8 @@
1
+ source "http://rubygems.org"
2
+
3
+ gem 'rspec', '>= 2.8.0'
4
+ gem 'rspec-rails', '>= 2.8.0'
5
+ gem 'pdf-inspector', '>= 1.0.1', :require => "pdf/inspector"
6
+ gem 'jasper-rails', '>= 0.1.1'
7
+
8
+ gemspec
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
@@ -0,0 +1,23 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "jasper-rails-rspec/version"
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = "jasper-rails-rspec"
7
+ s.version = JasperRailsRSpec::VERSION
8
+ s.authors = ["Marlus Saraiva", "Rodrigo Maia"]
9
+ s.summary = %q{jasper-rails RSpec integration}
10
+ s.description = %q{Defines matchers for testing PDFs generated by jasper-rails}
11
+ s.email = "rodrigomaia@grupofortes.com.br"
12
+ s.homepage = "https://github.com/fortesinformatica/jasper-rails-rspec"
13
+
14
+ s.files = `git ls-files`.split("\n")
15
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
16
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
17
+ s.require_paths = ["lib"]
18
+
19
+ s.add_dependency('rspec', '>= 2.8.0')
20
+ s.add_dependency('rspec-rails', '>= 2.8.0')
21
+ s.add_dependency('pdf-inspector', '>= 1.0.1')
22
+ s.add_dependency('jasper-rails', '>= 0.1.1')
23
+ end
@@ -0,0 +1,19 @@
1
+ require "jasper-rails/version"
2
+ require "rails"
3
+ require "rspec"
4
+ require "pdf/inspector"
5
+
6
+ RSpec::Matchers.define :contain do |string|
7
+ match do |response|
8
+ @pdf = PDF::Inspector::Text::analyze(response.body)
9
+ @pdf.strings.include? string
10
+ end
11
+
12
+ failure_message_for_should do |response|
13
+ "expected that the PDF text would contain #{expected}. It only contains: #{@pdf.strings.to_s}"
14
+ end
15
+
16
+ failure_message_for_should_not do |response|
17
+ "expected that the PDF text would not contain #{expected}. But it does: #{@pdf.strings.to_s}"
18
+ end
19
+ end
@@ -0,0 +1,4 @@
1
+ # -*- encoding: utf-8 -*-
2
+ module JasperRailsRSpec
3
+ VERSION = "0.1.1"
4
+ end
metadata ADDED
@@ -0,0 +1,94 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: jasper-rails-rspec
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Marlus Saraiva
9
+ - Rodrigo Maia
10
+ autorequire:
11
+ bindir: bin
12
+ cert_chain: []
13
+ date: 2012-05-17 00:00:00.000000000Z
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: rspec
17
+ requirement: &70216748104800 !ruby/object:Gem::Requirement
18
+ none: false
19
+ requirements:
20
+ - - ! '>='
21
+ - !ruby/object:Gem::Version
22
+ version: 2.8.0
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: *70216748104800
26
+ - !ruby/object:Gem::Dependency
27
+ name: rspec-rails
28
+ requirement: &70216748104320 !ruby/object:Gem::Requirement
29
+ none: false
30
+ requirements:
31
+ - - ! '>='
32
+ - !ruby/object:Gem::Version
33
+ version: 2.8.0
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: *70216748104320
37
+ - !ruby/object:Gem::Dependency
38
+ name: pdf-inspector
39
+ requirement: &70216748103860 !ruby/object:Gem::Requirement
40
+ none: false
41
+ requirements:
42
+ - - ! '>='
43
+ - !ruby/object:Gem::Version
44
+ version: 1.0.1
45
+ type: :runtime
46
+ prerelease: false
47
+ version_requirements: *70216748103860
48
+ - !ruby/object:Gem::Dependency
49
+ name: jasper-rails
50
+ requirement: &70216748103400 !ruby/object:Gem::Requirement
51
+ none: false
52
+ requirements:
53
+ - - ! '>='
54
+ - !ruby/object:Gem::Version
55
+ version: 0.1.1
56
+ type: :runtime
57
+ prerelease: false
58
+ version_requirements: *70216748103400
59
+ description: Defines matchers for testing PDFs generated by jasper-rails
60
+ email: rodrigomaia@grupofortes.com.br
61
+ executables: []
62
+ extensions: []
63
+ extra_rdoc_files: []
64
+ files:
65
+ - Gemfile
66
+ - Rakefile
67
+ - jasper-rails-rspec.gemspec
68
+ - lib/jasper-rails-rspec.rb
69
+ - lib/jasper-rails-rspec/version.rb
70
+ homepage: https://github.com/fortesinformatica/jasper-rails-rspec
71
+ licenses: []
72
+ post_install_message:
73
+ rdoc_options: []
74
+ require_paths:
75
+ - lib
76
+ required_ruby_version: !ruby/object:Gem::Requirement
77
+ none: false
78
+ requirements:
79
+ - - ! '>='
80
+ - !ruby/object:Gem::Version
81
+ version: '0'
82
+ required_rubygems_version: !ruby/object:Gem::Requirement
83
+ none: false
84
+ requirements:
85
+ - - ! '>='
86
+ - !ruby/object:Gem::Version
87
+ version: '0'
88
+ requirements: []
89
+ rubyforge_project:
90
+ rubygems_version: 1.8.17
91
+ signing_key:
92
+ specification_version: 3
93
+ summary: jasper-rails RSpec integration
94
+ test_files: []