Permalink
Browse files

starting on some specs for the plugins

  • Loading branch information...
1 parent 8d539e9 commit 98c8dcea29486e4ac4cadc97650265d32b0506fe @darrinholst darrinholst committed Feb 18, 2014
Showing with 52 additions and 0 deletions.
  1. +5 −0 Gemfile
  2. +12 −0 Gemfile.lock
  3. +6 −0 Rakefile
  4. +17 −0 spec/plugins/spec_helper.rb
  5. +12 −0 spec/plugins/stravalogger_spec.rb
View
5 Gemfile
@@ -4,3 +4,8 @@ gem 'feed-normalizer'
gem 'twitter', '~> 5.3.0'
gem 'twitter_oauth'
gem 'json'
+
+group :test do
+ gem 'rake'
+ gem 'rspec'
+end
View
12 Gemfile.lock
@@ -5,6 +5,7 @@ GEM
atomic (1.1.14)
buftok (0.2.0)
descendants_tracker (0.0.3)
+ diff-lcs (1.2.5)
equalizer (0.0.9)
faraday (0.9.0)
multipart-post (>= 1.2, < 3)
@@ -21,6 +22,15 @@ GEM
mime-types (2.1)
multipart-post (2.0.0)
oauth (0.4.7)
+ rake (10.1.1)
+ rspec (2.14.1)
+ rspec-core (~> 2.14.0)
+ rspec-expectations (~> 2.14.0)
+ rspec-mocks (~> 2.14.0)
+ rspec-core (2.14.7)
+ rspec-expectations (2.14.5)
+ diff-lcs (>= 1.1.3, < 2.0)
+ rspec-mocks (2.14.5)
simple-rss (1.3.1)
simple_oauth (0.2.0)
thread_safe (0.1.3)
@@ -47,5 +57,7 @@ PLATFORMS
DEPENDENCIES
feed-normalizer
json
+ rake
+ rspec
twitter (~> 5.3.0)
twitter_oauth
View
6 Rakefile
@@ -0,0 +1,6 @@
+require 'rspec/core/rake_task'
+
+RSpec::Core::RakeTask.new(:spec)
+
+task :default => :spec
+
View
17 spec/plugins/spec_helper.rb
@@ -0,0 +1,17 @@
+$:.unshift File.join(File.dirname(__FILE__), '..', '..', 'plugins_disabled')
+
+require 'rspec/mocks/standalone'
+$slog = double.as_null_object
+
+RSpec.configure do |config|
+ config.color_enabled = true
+end
+
+class Slogger
+ def initialize
+ RSpec::Mocks::setup(self)
+ @config = {}
+ @log = double.as_null_object
+ end
+end
+
View
12 spec/plugins/stravalogger_spec.rb
@@ -0,0 +1,12 @@
+require_relative 'spec_helper'
+require 'stravalogger'
+
+describe StravaLogger do
+ let(:strava) {
+ StravaLogger.new
+ }
+
+ it "grabs the feed and posts new entries" do
+ strava.do_log
+ end
+end

0 comments on commit 98c8dce

Please sign in to comment.