forked from hotsh/rstat.us
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e6ed809
commit d63970d
Showing
32 changed files
with
88 additions
and
135 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
defaults: &defaults | ||
host: 127.0.0.1 | ||
port: 27017 | ||
|
||
development: | ||
<<: *defaults | ||
database: rstatus-development | ||
|
||
test: | ||
<<: *defaults | ||
database: rstatus-test | ||
|
||
# set these environment variables on your prod server | ||
production: | ||
<<: *defaults | ||
database: <%= ENV['MONGOHQ_DATABASE'] %> | ||
uri: <%= ENV['MONGOHQ_URL'] %> | ||
|
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Empty file.
Empty file.
Empty file.
7 changes: 2 additions & 5 deletions
7
sinatra/test/unit/author_test.rb → test/models/author_test.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 2 additions & 5 deletions
7
sinatra/test/unit/authorization_test.rb → test/models/authorization_test.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 2 additions & 5 deletions
7
sinatra/test/unit/update_test.rb → test/models/update_test.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,51 @@ | ||
require "minitest/autorun" | ||
require "minitest/rails" | ||
|
||
ENV["RAILS_ENV"] = "test" | ||
require File.expand_path('../../config/environment', __FILE__) | ||
require 'rails/test_help' | ||
|
||
class ActiveSupport::TestCase | ||
# Setup all fixtures in test/fixtures/*.(yml|csv) for all tests in alphabetical order. | ||
# | ||
# Note: You'll currently still have to declare fixtures explicitly in integration tests | ||
# -- they do not yet inherit this setting | ||
fixtures :all | ||
MongoMapper.connection = Mongo::Connection.new('localhost') | ||
MongoMapper.database = "rstatus-test" | ||
|
||
require_relative "factories" | ||
|
||
class MiniTest::Rails::Spec | ||
|
||
def setup | ||
DatabaseCleaner.strategy = :truncation | ||
DatabaseCleaner.clean_with(:truncation) | ||
DatabaseCleaner.start | ||
end | ||
|
||
def teardown | ||
DatabaseCleaner.clean | ||
end | ||
|
||
def auth_response(username, options={}) | ||
hsh = { | ||
"provider" => options[:provider] || "twitter", | ||
"uid" => options[:uid] || 12345, | ||
"user_info" => { | ||
"name" => "Joe Public", | ||
"email" => "[email protected]", | ||
"nickname" => username, | ||
"urls" => { "Website" => "http://rstat.us" }, | ||
"description" => "A description", | ||
"image" => "/images/something.png" | ||
}, | ||
"credentials" => { | ||
"token" => options[:token] || "1234", | ||
"secret" => options[:secret] || "4567" | ||
} | ||
} | ||
return hsh | ||
end | ||
|
||
end | ||
|
||
# Add more helper methods to be used by all tests here... | ||
# Uncomment to support fixtures in Model tests... | ||
# require "active_record/fixtures" | ||
class MiniTest::Rails::Model | ||
# include ActiveRecord::TestFixtures | ||
# self.fixture_path = File.join(Rails.root, "test", "fixtures") | ||
end |
Empty file.