Browse Source

Adding rspec.

Arun Agrawal 7 years ago
parent
commit
190057d781
5 changed files with 28 additions and 0 deletions
  1. 1
    0
      .gitignore
  2. 1
    0
      .rspec
  3. 3
    0
      omniauth-twitter.gemspec
  4. 7
    0
      spec/omniauth/strategies/twitter_spec.rb
  5. 16
    0
      spec/spec_helper.rb

+ 1
- 0
.gitignore View File

@@ -2,3 +2,4 @@
2 2
 .bundle
3 3
 Gemfile.lock
4 4
 pkg/*
5
+coverage

+ 1
- 0
.rspec View File

@@ -0,0 +1 @@
1
+--colour

+ 3
- 0
omniauth-twitter.gemspec View File

@@ -20,4 +20,7 @@ Gem::Specification.new do |s|
20 20
 
21 21
   s.add_runtime_dependency 'omniauth-oauth', '~> 1.0.0.rc2'
22 22
   s.add_development_dependency 'rspec', '~> 2.7'
23
+  s.add_development_dependency 'rack-test'
24
+  s.add_development_dependency 'simplecov'
25
+  s.add_development_dependency 'webmock'  
23 26
 end

+ 7
- 0
spec/omniauth/strategies/twitter_spec.rb View File

@@ -0,0 +1,7 @@
1
+require 'spec_helper'
2
+
3
+describe OmniAuth::Strategies::Twitter do
4
+  it 'should do some testing' do
5
+    pending
6
+  end
7
+end

+ 16
- 0
spec/spec_helper.rb View File

@@ -0,0 +1,16 @@
1
+$:.unshift File.expand_path('..', __FILE__)
2
+$:.unshift File.expand_path('../../lib', __FILE__)
3
+require 'simplecov'
4
+SimpleCov.start
5
+require 'rspec'
6
+require 'rack/test'
7
+require 'webmock/rspec'
8
+require 'omniauth'
9
+require 'omniauth-twitter'
10
+
11
+RSpec.configure do |config|
12
+  config.include WebMock::API
13
+  config.include Rack::Test::Methods
14
+  config.extend  OmniAuth::Test::StrategyMacros, :type => :strategy
15
+end
16
+

Loading…
Cancel
Save