Skip to content

Commit

Permalink
Minor spec updates;
Browse files Browse the repository at this point in the history
Test for version constant
  • Loading branch information
pboling committed Sep 4, 2016
1 parent 4fd2522 commit 67f17be
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 17 deletions.
1 change: 1 addition & 0 deletions .rspec
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
--format documentation
--color
10 changes: 6 additions & 4 deletions spec/dynamoid_spec.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
require "spec_helper"

describe "Dynamoid" do
describe Dynamoid do
it "has a version number" do
expect(Dynamoid::VERSION).not_to be nil
end

it "doesn't puke when asked for the assocations of a new record" do
it "does not puke when asked for the assocations of a new record" do
expect(User.new.books).to eq([])
end

end
26 changes: 13 additions & 13 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
require 'coveralls'
require "coveralls"
Coveralls.wear!

$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
$LOAD_PATH.unshift File.expand_path("../../lib", __FILE__)
$LOAD_PATH.unshift(File.dirname(__FILE__))

MODELS = File.join(File.dirname(__FILE__), "app/models")

require 'rspec'
require 'dynamoid'
require 'pry'
require 'aws-sdk-resources'
require "rspec"
require "dynamoid"
require "pry"
require "aws-sdk-resources"

require 'dynamodb_local'
require "dynamodb_local"

ENV['ACCESS_KEY'] ||= 'abcd'
ENV['SECRET_KEY'] ||= '1234'
ENV["ACCESS_KEY"] ||= "abcd"
ENV["SECRET_KEY"] ||= "1234"

Aws.config.update({
region: 'us-west-2',
credentials: Aws::Credentials.new(ENV['ACCESS_KEY'], ENV['SECRET_KEY'])
region: "us-west-2",
credentials: Aws::Credentials.new(ENV["ACCESS_KEY"], ENV["SECRET_KEY"])
})

Dynamoid.configure do |config|
config.endpoint = 'http://127.0.0.1:8000'
config.namespace = 'dynamoid_tests'
config.endpoint = "http://127.0.0.1:8000"
config.namespace = "dynamoid_tests"
config.warn_on_scan = false
end

Expand Down

0 comments on commit 67f17be

Please sign in to comment.