rspectacular 0.0.3 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. data/README.md +2 -0
  2. data/Rakefile +1 -2
  3. data/lib/rspectacular/helpers/date_time_select.rb +35 -0
  4. data/lib/rspectacular/helpers/facebook.rb +59 -0
  5. data/lib/rspectacular/helpers/paypal.rb +30 -0
  6. data/lib/rspectacular/helpers/rails_flashes.rb +15 -0
  7. data/lib/rspectacular/helpers/session_helpers.rb +10 -0
  8. data/lib/rspectacular/helpers.rb +3 -0
  9. data/lib/rspectacular/{active_record → matchers/active_record}/date_range_matcher.rb +0 -0
  10. data/lib/rspectacular/{active_record → matchers/active_record}/dateliness_matcher.rb +0 -0
  11. data/lib/rspectacular/{active_record → matchers/active_record}/persistence_matcher.rb +0 -0
  12. data/lib/rspectacular/{active_record → matchers/active_record}/positivity_matcher.rb +0 -0
  13. data/lib/rspectacular/{active_record → matchers/active_record}/truthfulness_matcher.rb +0 -0
  14. data/lib/rspectacular/matchers/active_record.rb +13 -0
  15. data/lib/rspectacular/matchers/authentication.rb +39 -0
  16. data/lib/rspectacular/matchers.rb +2 -0
  17. data/lib/rspectacular/plugins/capybara.rb +3 -0
  18. data/lib/rspectacular/plugins/carrier_wave.rb +24 -0
  19. data/lib/rspectacular/plugins/database_cleaner.rb +29 -0
  20. data/lib/rspectacular/plugins/devise.rb +8 -0
  21. data/lib/rspectacular/plugins/email.rb +15 -0
  22. data/lib/rspectacular/plugins/facebook.rb +14 -0
  23. data/lib/rspectacular/plugins/omniauth.rb +22 -0
  24. data/lib/rspectacular/plugins/paypal.rb +14 -0
  25. data/lib/rspectacular/plugins/recaptcha.rb +5 -0
  26. data/lib/rspectacular/plugins/selenium.rb +4 -0
  27. data/lib/rspectacular/plugins/shoulda.rb +15 -0
  28. data/lib/rspectacular/plugins/timecop.rb +7 -0
  29. data/lib/rspectacular/plugins.rb +1 -0
  30. data/lib/rspectacular/selectors/defaults.rb +50 -0
  31. data/lib/rspectacular/selectors.rb +26 -0
  32. data/lib/rspectacular/spec_helpers/active_record_spec_helper.rb +34 -0
  33. data/lib/rspectacular/support/focused.rb +7 -0
  34. data/lib/rspectacular/support/pending.rb +4 -0
  35. data/lib/rspectacular/support.rb +2 -0
  36. data/lib/rspectacular/version.rb +2 -2
  37. data/lib/rspectacular.rb +5 -3
  38. data/spec/spec_helper.rb +6 -0
  39. metadata +84 -61
  40. data/.gitignore +0 -3
  41. data/Gemfile +0 -4
  42. data/lib/rspectacular/active_record/matchers.rb +0 -5
  43. data/lib/rspectacular/active_record.rb +0 -1
  44. data/lib/rspectacular/rspec.rb +0 -17
  45. data/rails/init.rb +0 -5
  46. data/rspectacular.gemspec +0 -23
data/README.md ADDED
@@ -0,0 +1,2 @@
1
+ Rspectacular
2
+ ==============================================================================
data/Rakefile CHANGED
@@ -1,2 +1 @@
1
- require 'bundler'
2
- Bundler::GemHelper.install_tasks
1
+ require "bundler/gem_tasks"
@@ -0,0 +1,35 @@
1
+ ###
2
+ # Unscrupulously stolen from: https://raw.github.com/cucumber/cucumber-rails/master/lib/cucumber/rails/capybara/select_dates_and_times.rb
3
+ #
4
+ def select_date(date, options = {})
5
+ date = Time.parse(date)
6
+ base_dom_id = get_base_dom_id_from_label_tag(options[:from])
7
+
8
+ page.execute_script %Q{$("##{base_dom_id}_1i").val("#{date.strftime('%Y')}")}
9
+ page.execute_script %Q{$("##{base_dom_id}_2i").val("#{date.strftime('%m')}")}
10
+ page.execute_script %Q{$("##{base_dom_id}_3i").val("#{date.strftime('%d')}")}
11
+ page.execute_script %Q{$("##{base_dom_id}_datepicker").val("#{date.strftime('%m/%d/%Y')}")}
12
+ page.execute_script %Q{$("##{base_dom_id}_datepicker").change()}
13
+ end
14
+
15
+ def select_time(time, options = {})
16
+ time = Time.zone.parse(time)
17
+ base_dom_id = get_base_dom_id_from_label_tag(options[:from])
18
+
19
+ find(:xpath, ".//select[@id='#{base_dom_id}_4i']").select(time.strftime '%I %p')
20
+ find(:xpath, ".//select[@id='#{base_dom_id}_5i']").select(time.min.to_s.rjust(2, '0'))
21
+
22
+ page.execute_script %Q{$("##{base_dom_id}_datepicker").change()}
23
+ end
24
+
25
+ def select_datetime(datetime, options = {})
26
+ select_date(datetime, options)
27
+ select_time(datetime, options)
28
+ end
29
+
30
+ private
31
+
32
+ # @example "event_starts_at_"
33
+ def get_base_dom_id_from_label_tag(field)
34
+ find(:xpath, ".//label[contains(., '#{field}')]")['for'].gsub(/(_[1-5]i)$/, '')
35
+ end
@@ -0,0 +1,59 @@
1
+ def fill_in_facebook_login_form(options = {})
2
+ facebook_user = options[:with]
3
+
4
+ sleep 1
5
+
6
+ within sf('the Facebook login form') do
7
+ fill_in 'Email', :with => facebook_user['email']
8
+ fill_in 'Password', :with => facebook_user['password']
9
+ click_link_or_button 'Log In'
10
+ end
11
+ end
12
+
13
+ def log_in_to_facebook(user)
14
+ ###
15
+ # We use this URL due to how selenium throws an error if you
16
+ # interact with items that are off the visible area of the
17
+ # page
18
+ #
19
+ visit 'https://www.facebook.com/login.php'
20
+
21
+ sleep 3
22
+
23
+ fill_in 'Email', :with => user['email']
24
+ fill_in 'Password', :with => user['password']
25
+
26
+ click_link_or_button 'Log In'
27
+ end
28
+
29
+ def log_out_of_facebook
30
+ click_link idsf('the Facebook account menu')
31
+ click_button 'Log Out'
32
+ end
33
+
34
+ def authenticate_with_facebook
35
+ visit '/users/auth/facebook'
36
+ end
37
+
38
+ def click_facebook_tab(tab_name)
39
+ find(:xpath, %Q{.//span[starts-with(., '#{tab_name}')]/../..}).click()
40
+ end
41
+
42
+ def remove_app_from_authorized_apps_at_facebook(app_name)
43
+ visit 'http://www.facebook.com/settings?tab=applications'
44
+
45
+ page.should_not have_content 'You have not authorized any apps to interact with your Facebook account.'
46
+ page.should have_content app_name
47
+
48
+ find("input[type='button'][title='Remove']").click()
49
+
50
+ sleep 1
51
+
52
+ click_link_or_button 'Remove'
53
+
54
+ sleep 1
55
+
56
+ page.should_not have_content app_name
57
+
58
+ log_out_of_facebook
59
+ end
@@ -0,0 +1,30 @@
1
+ def log_in_to_paypal_sandbox(email, password)
2
+ visit 'https://developer.paypal.com'
3
+
4
+ if page.has_button? 'Log In'
5
+ fill_in 'Email', :with => email
6
+ fill_in 'Password', :with => password
7
+ click_link_or_button 'Log In'
8
+ end
9
+ end
10
+
11
+ def log_out_of_paypal
12
+ visit 'https://www.paypal.com/us/cgi-bin/webscr?cmd=_logout'
13
+ end
14
+
15
+ def log_out_of_paypal_sandbox
16
+ visit 'https://developer.paypal.com'
17
+
18
+ if page.has_link? 'Log Out'
19
+ click_link 'Log Out'
20
+ end
21
+ end
22
+
23
+ def fill_in_paypal_login_form(email, password)
24
+ fill_in 'Email', :with => email
25
+ fill_in 'PayPal password', :with => password
26
+ click_link_or_button 'Log In'
27
+
28
+ check 'esignOpt'
29
+ click_link_or_button 'Agree and Continue'
30
+ end
@@ -0,0 +1,15 @@
1
+ def flash_message
2
+ fsf('the flash').text
3
+ end
4
+
5
+ def flash_alert
6
+ fsf('the flash alert').text
7
+ end
8
+
9
+ def flash_warning
10
+ fsf('the flash warning').text
11
+ end
12
+
13
+ def flash_notice
14
+ fsf('the flash notice').text
15
+ end
@@ -0,0 +1,10 @@
1
+ if defined? Devise
2
+ def log_in(user, options = {})
3
+ initial_path = options.fetch(:initial_path, :root_path)
4
+ visit send(initial_path, :auth_token => user.authentication_token)
5
+ end
6
+
7
+ def log_out
8
+ visit destroy_user_session_path
9
+ end
10
+ end
@@ -0,0 +1,3 @@
1
+ if defined? Capybara
2
+ Dir[File.expand_path('../helpers/**/*.rb', __FILE__)].each { |f| require f }
3
+ end
@@ -0,0 +1,13 @@
1
+ if defined? ActiveRecord
2
+ # require 'rspectacular/active_record/date_range_matcher'
3
+ # require 'rspectacular/active_record/dateliness_matcher'
4
+ # require 'rspectacular/active_record/persistence_matcher'
5
+ # require 'rspectacular/active_record/positivity_matcher'
6
+ # require 'rspectacular/active_record/truthfulness_matcher'
7
+
8
+ # module RSpec
9
+ # module Matchers
10
+ # include RSpectacular::ActiveRecord::Matchers
11
+ # end
12
+ # end
13
+ end
@@ -0,0 +1,39 @@
1
+ module RSpectacular
2
+ module Matchers
3
+ module Authentication
4
+ def it_should_require_authentication_for(*actions)
5
+ actions.each do |action_parts|
6
+ method, action, params = action_parts
7
+
8
+ params ||= {}
9
+ params.reverse_merge! :id => 1
10
+
11
+ it "#{method.upcase} ##{action} should require login" do
12
+ send(method, action, params)
13
+
14
+ response.should redirect_to(new_user_session_path)
15
+ end
16
+ end
17
+ end
18
+
19
+ def it_should_not_require_authentication_for(*actions)
20
+ actions.each do |action_parts|
21
+ method, action, params = action_parts
22
+
23
+ params ||= {}
24
+ params.reverse_merge! :id => 1
25
+
26
+ it "#{method.upcase} ##{action} should not require login" do
27
+ send(method, action, params)
28
+
29
+ response.should_not redirect_to(new_user_session_path)
30
+ end
31
+ end
32
+ end
33
+ end
34
+ end
35
+ end
36
+
37
+ RSpec.configure do |config|
38
+ config.extend RSpectacular::Matchers::Authentication, :type => :controller
39
+ end
@@ -0,0 +1,2 @@
1
+ require 'rspectacular/matchers/active_record'
2
+ require 'rspectacular/matchers/authentication'
@@ -0,0 +1,3 @@
1
+ if defined? Capybara::Webkit
2
+ Capybara.javascript_driver = :webkit
3
+ end
@@ -0,0 +1,24 @@
1
+ ###
2
+ # Make CarrierWave tests faster and more reliable
3
+ #
4
+ if defined? CarrierWave
5
+ require 'carrierwave/test/matchers'
6
+
7
+ CarrierWave.configure do |config|
8
+ config.storage = :file
9
+ config.root = Rails.root.join('tmp')
10
+ config.enable_processing = false
11
+ end
12
+
13
+ RSpec.configure do |config|
14
+ config.include CarrierWave::Test::Matchers, :carrier_wave => true
15
+
16
+ config.before(:each, :carrier_wave => true) do
17
+ subject.class.enable_processing = true
18
+ end
19
+
20
+ config.after(:each, :carrier_wave => true) do
21
+ subject.class.enable_processing = false
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,29 @@
1
+ if defined? DatabaseCleaner && defined? RSpec::Rails
2
+ RSpec.configure do |config|
3
+ config.use_transactional_fixtures = false
4
+
5
+ config.before(:suite) do
6
+ DatabaseCleaner.clean_with(:truncation)
7
+ end
8
+
9
+ config.before(:each) do
10
+ DatabaseCleaner.strategy = :transaction
11
+ end
12
+
13
+ config.before(:each, :js => true) do
14
+ DatabaseCleaner.strategy = :truncation, { :pre_count => true }
15
+ end
16
+
17
+ config.before(:each) do
18
+ DatabaseCleaner.start
19
+ end
20
+
21
+ config.after(:each) do
22
+ DatabaseCleaner.clean
23
+ end
24
+ end
25
+ else
26
+ RSpec.configure do |config|
27
+ config.use_transactional_fixtures = true
28
+ end
29
+ end
@@ -0,0 +1,8 @@
1
+ if defined? Devise
2
+ # Don't go nuts encrypting the password, we're just testing
3
+ Devise.stretches = 1
4
+
5
+ RSpec.configure do |config|
6
+ config.include Devise::TestHelpers, :type => :controller
7
+ end
8
+ end
@@ -0,0 +1,15 @@
1
+ if defined? EmailSpec
2
+ RSpec.configure do |config|
3
+ config.include EmailSpec::Helpers, :email => true
4
+ config.include EmailSpec::Matchers, :email => true
5
+ end
6
+ end
7
+
8
+ if defined? ActionMailer
9
+ RSpec.configure do |config|
10
+ config.after(:each, :email => true) do
11
+ # Clear all ActionMailer test emails after email specs
12
+ ActionMailer::Base.deliveries.clear
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,14 @@
1
+ if defined? Capybara
2
+ RSpec.configure do |config|
3
+ config.after(:each, :facebook => true) do
4
+ visit 'https://www.facebook.com'
5
+
6
+ if Capybara.current_session.has_link? idsf('the Facebook account menu')
7
+ click_link idsf('the Facebook account menu')
8
+ click_button 'Log Out'
9
+
10
+ page.driver.browser.switch_to.alert.accept
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,22 @@
1
+ if defined? OmniAuth
2
+ ###
3
+ # Tell OmniAuth to just return whatever hash we want for each auth type
4
+ #
5
+ OmniAuth.config.test_mode = true
6
+ OmniAuth.config.mock_auth[:facebook] = MockAuthentication::Facebook.user
7
+
8
+ ###
9
+ # Except we don't want OmniAuth to fake anything when doing live tests
10
+ #
11
+ RSpec.configure do |config|
12
+ config.before(:each, :js => true) do
13
+ @previous_omniauth_test_mode = OmniAuth.config.test_mode
14
+
15
+ OmniAuth.config.test_mode = false
16
+ end
17
+
18
+ config.after(:each, :js => true) do
19
+ OmniAuth.config.test_mode = @previous_omniauth_test_mode
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,14 @@
1
+ ###
2
+ # PayPal requires that you log into the PayPal sandbox before getting access
3
+ # to test users.
4
+ #
5
+ RSpec.configure do |config|
6
+ config.before(:each, :paypal => true) do
7
+ log_in_to_paypal_sandbox
8
+ end
9
+
10
+ config.after(:each, :paypal => true) do
11
+ log_out_of_paypal
12
+ log_out_of_paypal_sandbox
13
+ end
14
+ end
@@ -0,0 +1,5 @@
1
+ if defined? Recaptcha
2
+ Recaptcha.configure do |config|
3
+ config.skip_verify_env = ['test']
4
+ end
5
+ end
@@ -0,0 +1,4 @@
1
+ # For when you just have to know what the hell the browser is doing
2
+ RSpec.configure do |config|
3
+ config.alias_example_to :sit, :focused => true, :js => true, :driver => :selenium
4
+ end
@@ -0,0 +1,15 @@
1
+ if defined? Shoulda::Matchers
2
+ module ShouldaRoutingMatchers
3
+ def route(method, path)
4
+ Shoulda::Matchers::ActionController::RouteMatcher.new(method, path, self)
5
+ end
6
+ end
7
+
8
+ module RSpec
9
+ module Rails
10
+ module RoutingExampleGroup
11
+ include ShouldaRoutingMatchers
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,7 @@
1
+ if defined? Timecop
2
+ RSpec.configure do |config|
3
+ config.after(:each, :time_mock => true) do
4
+ Timecop.return
5
+ end
6
+ end
7
+ end
@@ -0,0 +1 @@
1
+ Dir[File.expand_path('../plugins/**/*.rb', __FILE__)].each { |f| require f }
@@ -0,0 +1,50 @@
1
+ module RSpectacular
2
+ Selectors ||= {}
3
+
4
+ Selectors.merge!(
5
+ /the Facebook application/ => lambda do
6
+ frame_element = find 'html#facebook div#pagelet_app_runner iframe'
7
+ frame_element[:id]
8
+ end,
9
+
10
+ /the flash(.*)/ => lambda do
11
+ flash_type_class = $1.strip
12
+ flash_type_class = flash_type_class.empty? ? '' : ".#{flash_type_class}"
13
+
14
+ ".flash#{flash_type_class} p"
15
+ end,
16
+
17
+ ###
18
+ # Facebook
19
+ #
20
+ /the Facebook login form/ => 'html#facebook form#login_form',
21
+ /the Facebook page timeline nav bar/ => 'html#facebook #fbTimelineNavTopRow',
22
+ /the Facebook account menu/ => '#navAccountLink',
23
+
24
+ ###
25
+ # PayPal
26
+ #
27
+ /the "Pay with PayPal" button/ => 'input[alt="Check out with PayPal"]',
28
+
29
+ ###
30
+ # Forms
31
+ #
32
+ /the errors for (.*)/ => -> { "#{sf $1}+div.error" },
33
+
34
+ ###
35
+ # Windows
36
+ #
37
+ /the most recently opened window/ => -> { page.driver.browser.window_handles.last },
38
+ /the alert dialog/ => -> { page.driver.browser.switch_to.alert },
39
+
40
+ ###
41
+ # Date Picker Buttons
42
+ #
43
+ /the date picker button for today/ => '.ui-datepicker-today',
44
+
45
+ ###
46
+ # Model Links
47
+ #
48
+ /the (.*) button for/ => -> { "##{$1.gsub(/ /, '_')}_#{args[0].class.name.underscore}_#{args[0].id}_link" }
49
+ )
50
+ end
@@ -0,0 +1,26 @@
1
+ def fsf(*args)
2
+ selector = sf(*args)
3
+ selector_format = selector.starts_with?('.//') ? :xpath : :css
4
+
5
+ page.find(selector_format, selector)
6
+ end
7
+
8
+ def idsf(*args)
9
+ id_selector = sf(*args)
10
+ id_selector.starts_with?('#') ? id_selector[1..-1] : id_selector
11
+ end
12
+
13
+ def sf(*args)
14
+ string = args.shift
15
+ selector = RSpectacular::Selectors.find { |regex, selector| string.match regex }
16
+
17
+ if selector.present?
18
+ if selector.respond_to? :call
19
+ selector.call(*args)
20
+ else
21
+ selector
22
+ end
23
+ end
24
+ end
25
+
26
+ require File.expand_path('../selectors/defaults', __FILE__)
@@ -0,0 +1,34 @@
1
+ require 'active_record'
2
+
3
+ begin
4
+ require 'factory_girl'
5
+ rescue LoadError
6
+ end
7
+
8
+ rails_database_yaml_file_path = File.expand_path('../config/database.yml', __FILE__)
9
+ rails_engine_database_yaml_file_path = File.expand_path('../dummy/config/database.yml', __FILE__)
10
+
11
+ database_yaml_file_path = if File.exist? rails_engine_database_yaml_file_path
12
+ rails_engine_database_yaml_file_path
13
+ else
14
+ rails_database_yaml_file_path
15
+ end
16
+
17
+ connection_info = YAML.load_file(database_yaml_file_path)['test']
18
+
19
+ ActiveRecord::Base.establish_connection(connection_info)
20
+
21
+ Dir[File.expand_path('../factories/**/*.rb', __FILE__)].each { |f| require f }
22
+ Dir[File.expand_path('../support/**/*.rb', __FILE__)].each { |f| require f }
23
+
24
+ RSpec.configure do |config|
25
+ config.order = 'random'
26
+ config.color = true
27
+
28
+ config.around do |example|
29
+ ActiveRecord::Base.transaction do
30
+ example.run
31
+ raise ActiveRecord::Rollback
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,7 @@
1
+ RSpec.configure do |config|
2
+ # Configure RSpec to run focused specs, and also respect the alias 'fit' for focused specs
3
+ config.treat_symbols_as_metadata_keys_with_true_values = true
4
+ config.filter_run :focused => true
5
+ config.alias_example_to :fit, :focused => true
6
+ config.run_all_when_everything_filtered = true
7
+ end
@@ -0,0 +1,4 @@
1
+ RSpec.configure do |config|
2
+ # Configure RSpec to respect the alias 'pit' for pending specs
3
+ config.alias_example_to :pit, :pending => true
4
+ end
@@ -0,0 +1,2 @@
1
+ require 'rspectacular/support/focused'
2
+ require 'rspectacular/support/pending'
@@ -1,3 +1,3 @@
1
- module Rspectacular
2
- VERSION = "0.0.3"
1
+ module RSpectacular
2
+ VERSION = '0.1.0'
3
3
  end
data/lib/rspectacular.rb CHANGED
@@ -1,3 +1,5 @@
1
- if defined? RSpec
2
- require 'rspectacular/rspec'
3
- end
1
+ require 'rspectacular/support'
2
+ require 'rspectacular/helpers'
3
+ require 'rspectacular/selectors'
4
+ require 'rspectacular/plugins'
5
+ require 'rspectacular/matchers'
@@ -0,0 +1,6 @@
1
+ require 'rspectacular'
2
+
3
+ Dir[File.expand_path('../support/**/*.rb', __FILE__)].each { |f| require f }
4
+
5
+ RSpec.configure do |config|
6
+ end
metadata CHANGED
@@ -1,80 +1,103 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: rspectacular
3
- version: !ruby/object:Gem::Version
4
- version: 0.0.3
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ prerelease:
5
6
  platform: ruby
6
- authors:
7
+ authors:
7
8
  - jfelchner
8
- - thekompanee
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
-
13
- date: 2011-07-01 00:00:00 -05:00
14
- default_executable:
15
- dependencies:
16
- - !ruby/object:Gem::Dependency
17
- name: shoulda
12
+ date: 2013-01-25 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: rspec
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ~>
20
+ - !ruby/object:Gem::Version
21
+ version: '2.12'
18
22
  type: :runtime
19
- version_requirement:
20
- version_requirements: !ruby/object:Gem::Requirement
21
- requirements:
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
22
27
  - - ~>
23
- - !ruby/object:Gem::Version
24
- version: 2.11.0
25
- version:
26
- description: We rock some custom RSpec matchers like it ain't nobody's bidnezz.
27
- email:
28
- - support@thekompanee.com
28
+ - !ruby/object:Gem::Version
29
+ version: '2.12'
30
+ description: We rock some RSpec configurations and matchers like it ain't nobody's
31
+ bidnezz.
32
+ email: accounts+git@thekompanee.com
29
33
  executables: []
30
-
31
34
  extensions: []
32
-
33
- extra_rdoc_files: []
34
-
35
- files:
36
- - .gitignore
37
- - Gemfile
38
- - Rakefile
39
- - lib/rspectacular.rb
40
- - lib/rspectacular/active_record.rb
41
- - lib/rspectacular/active_record/date_range_matcher.rb
42
- - lib/rspectacular/active_record/dateliness_matcher.rb
43
- - lib/rspectacular/active_record/matchers.rb
44
- - lib/rspectacular/active_record/persistence_matcher.rb
45
- - lib/rspectacular/active_record/positivity_matcher.rb
46
- - lib/rspectacular/active_record/truthfulness_matcher.rb
47
- - lib/rspectacular/rspec.rb
35
+ extra_rdoc_files:
36
+ - README.md
37
+ files:
38
+ - lib/rspectacular/helpers/date_time_select.rb
39
+ - lib/rspectacular/helpers/facebook.rb
40
+ - lib/rspectacular/helpers/paypal.rb
41
+ - lib/rspectacular/helpers/rails_flashes.rb
42
+ - lib/rspectacular/helpers/session_helpers.rb
43
+ - lib/rspectacular/helpers.rb
44
+ - lib/rspectacular/matchers/active_record/date_range_matcher.rb
45
+ - lib/rspectacular/matchers/active_record/dateliness_matcher.rb
46
+ - lib/rspectacular/matchers/active_record/persistence_matcher.rb
47
+ - lib/rspectacular/matchers/active_record/positivity_matcher.rb
48
+ - lib/rspectacular/matchers/active_record/truthfulness_matcher.rb
49
+ - lib/rspectacular/matchers/active_record.rb
50
+ - lib/rspectacular/matchers/authentication.rb
51
+ - lib/rspectacular/matchers.rb
52
+ - lib/rspectacular/plugins/capybara.rb
53
+ - lib/rspectacular/plugins/carrier_wave.rb
54
+ - lib/rspectacular/plugins/database_cleaner.rb
55
+ - lib/rspectacular/plugins/devise.rb
56
+ - lib/rspectacular/plugins/email.rb
57
+ - lib/rspectacular/plugins/facebook.rb
58
+ - lib/rspectacular/plugins/omniauth.rb
59
+ - lib/rspectacular/plugins/paypal.rb
60
+ - lib/rspectacular/plugins/recaptcha.rb
61
+ - lib/rspectacular/plugins/selenium.rb
62
+ - lib/rspectacular/plugins/shoulda.rb
63
+ - lib/rspectacular/plugins/timecop.rb
64
+ - lib/rspectacular/plugins.rb
65
+ - lib/rspectacular/selectors/defaults.rb
66
+ - lib/rspectacular/selectors.rb
67
+ - lib/rspectacular/spec_helpers/active_record_spec_helper.rb
68
+ - lib/rspectacular/support/focused.rb
69
+ - lib/rspectacular/support/pending.rb
70
+ - lib/rspectacular/support.rb
48
71
  - lib/rspectacular/version.rb
49
- - rails/init.rb
50
- - rspectacular.gemspec
51
- has_rdoc: true
72
+ - lib/rspectacular.rb
73
+ - Rakefile
74
+ - README.md
75
+ - spec/spec_helper.rb
52
76
  homepage: https://github.com/jfelchner/rspectacular
53
77
  licenses: []
54
-
55
78
  post_install_message:
56
- rdoc_options: []
57
-
58
- require_paths:
79
+ rdoc_options:
80
+ - --charset = UTF-8
81
+ require_paths:
59
82
  - lib
60
- required_ruby_version: !ruby/object:Gem::Requirement
61
- requirements:
62
- - - ">="
63
- - !ruby/object:Gem::Version
64
- version: "0"
65
- version:
66
- required_rubygems_version: !ruby/object:Gem::Requirement
67
- requirements:
68
- - - ">="
69
- - !ruby/object:Gem::Version
70
- version: "0"
71
- version:
83
+ required_ruby_version: !ruby/object:Gem::Requirement
84
+ none: false
85
+ requirements:
86
+ - - ! '>='
87
+ - !ruby/object:Gem::Version
88
+ version: '0'
89
+ required_rubygems_version: !ruby/object:Gem::Requirement
90
+ none: false
91
+ requirements:
92
+ - - ! '>='
93
+ - !ruby/object:Gem::Version
94
+ version: '0'
72
95
  requirements: []
73
-
74
96
  rubyforge_project: rspectacular
75
- rubygems_version: 1.3.5
97
+ rubygems_version: 1.8.23
76
98
  signing_key:
77
99
  specification_version: 3
78
- summary: Custom RSpec matchers
79
- test_files: []
80
-
100
+ summary: RSpec Support And Matchers
101
+ test_files:
102
+ - spec/spec_helper.rb
103
+ has_rdoc:
data/.gitignore DELETED
@@ -1,3 +0,0 @@
1
- pkg/*
2
- *.gem
3
- .bundle
data/Gemfile DELETED
@@ -1,4 +0,0 @@
1
- source "http://rubygems.org"
2
-
3
- # Specify your gem's dependencies in rspectacular.gemspec
4
- gemspec
@@ -1,5 +0,0 @@
1
- require 'rspectacular/active_record/date_range_matcher'
2
- require 'rspectacular/active_record/dateliness_matcher'
3
- require 'rspectacular/active_record/persistence_matcher'
4
- require 'rspectacular/active_record/positivity_matcher'
5
- require 'rspectacular/active_record/truthfulness_matcher'
@@ -1 +0,0 @@
1
- require 'rspectacular/active_record/matchers'
@@ -1,17 +0,0 @@
1
- require 'rspectacular/active_record/matchers'
2
-
3
- module RSpec
4
- module Matchers
5
- include RSpectacular::ActiveRecord::Matchers
6
- end
7
-
8
- # module Rails
9
- # module ControllerExampleGroup
10
- # include Shoulda::ActionController::Matchers
11
- # end
12
-
13
- # module MailerExampleGroup
14
- # include Shoulda::ActionMailer::Matchers
15
- # end
16
- # end
17
- end
data/rails/init.rb DELETED
@@ -1,5 +0,0 @@
1
- if RAILS_ENV == 'test'
2
- if defined? RSpec
3
- require 'rspectacular/matchers'
4
- end
5
- end
data/rspectacular.gemspec DELETED
@@ -1,23 +0,0 @@
1
- # -*- encoding: utf-8 -*-
2
- $:.push File.expand_path("../lib", __FILE__)
3
- require "rspectacular/version"
4
-
5
- Gem::Specification.new do |s|
6
- s.name = "rspectacular"
7
- s.version = Rspectacular::VERSION
8
- s.platform = Gem::Platform::RUBY
9
- s.authors = ["jfelchner", "thekompanee"]
10
- s.email = ["support@thekompanee.com"]
11
- s.homepage = "https://github.com/jfelchner/rspectacular"
12
- s.summary = %q{Custom RSpec matchers}
13
- s.description = %q{We rock some custom RSpec matchers like it ain't nobody's bidnezz.}
14
-
15
- s.rubyforge_project = "rspectacular"
16
-
17
- s.files = `git ls-files`.split("\n")
18
- s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
19
- s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
20
- s.require_paths = ["lib"]
21
-
22
- s.add_dependency('shoulda', '~> 2.11.0')
23
- end