Skip to content
This repository has been archived by the owner on Oct 27, 2022. It is now read-only.

Commit

Permalink
starting on some specs for the plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
darrinholst committed Feb 18, 2014
1 parent 8d539e9 commit 98c8dce
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Gemfile
Expand Up @@ -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
12 changes: 12 additions & 0 deletions Gemfile.lock
Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -47,5 +57,7 @@ PLATFORMS
DEPENDENCIES
feed-normalizer
json
rake
rspec
twitter (~> 5.3.0)
twitter_oauth
6 changes: 6 additions & 0 deletions Rakefile
@@ -0,0 +1,6 @@
require 'rspec/core/rake_task'

RSpec::Core::RakeTask.new(:spec)

task :default => :spec

17 changes: 17 additions & 0 deletions 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

12 changes: 12 additions & 0 deletions 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.