commit
30331bde01
43
Gemfile
43
Gemfile
|
@ -1,28 +1,23 @@
|
|||
source 'https://rubygems.org'
|
||||
|
||||
ruby '2.1.1'
|
||||
|
||||
#Dokku demands this one.
|
||||
gem 'rails_12factor'
|
||||
|
||||
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
|
||||
gem 'rails', '4.1.0'
|
||||
|
||||
gem 'mongoid', '~> 4.0.0.beta1', github: 'mongoid/mongoid'
|
||||
|
||||
# Use SCSS for stylesheets
|
||||
gem 'sass-rails', '~> 4.0.0'
|
||||
|
||||
# Use Uglifier as compressor for JavaScript assets
|
||||
gem 'uglifier', '>= 1.3.0'
|
||||
|
||||
# Use CoffeeScript for .js.coffee assets and views
|
||||
gem 'coffee-rails', '~> 4.0.0'
|
||||
|
||||
gem 'sass-rails'
|
||||
gem 'coffee-rails'
|
||||
gem 'uglifier'
|
||||
gem 'foundation-icons-sass-rails'
|
||||
gem 'foundation-rails'
|
||||
gem 'jquery-rails'
|
||||
gem 'high_voltage'
|
||||
|
||||
gem 'foundation-rails'
|
||||
|
||||
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
|
||||
# gem 'therubyracer', platforms: :ruby
|
||||
|
||||
# Use jquery as the JavaScript library
|
||||
gem 'jquery-rails'
|
||||
|
||||
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
|
||||
gem 'jbuilder', '~> 1.2'
|
||||
|
@ -32,15 +27,11 @@ group :doc do
|
|||
gem 'sdoc', require: false
|
||||
end
|
||||
|
||||
# Use ActiveModel has_secure_password
|
||||
# gem 'bcrypt-ruby', '~> 3.1.2'
|
||||
|
||||
# Use unicorn as the app server
|
||||
# gem 'unicorn'
|
||||
|
||||
# Use Capistrano for deployment
|
||||
# gem 'capistrano', group: :development
|
||||
|
||||
gem 'pry', group: [:development, :test]
|
||||
group :development, :test do
|
||||
gem 'pry'
|
||||
gem 'rspec'
|
||||
gem 'rspec-rails', '~> 3.0.0.beta'
|
||||
gem 'simplecov'
|
||||
end
|
||||
|
||||
gem 'devise', github: 'plataformatec/devise'
|
||||
|
|
47
Gemfile.lock
47
Gemfile.lock
|
@ -61,8 +61,13 @@ GEM
|
|||
execjs
|
||||
coffee-script-source (1.7.0)
|
||||
connection_pool (2.0.0)
|
||||
diff-lcs (1.2.5)
|
||||
docile (1.1.3)
|
||||
erubis (2.7.0)
|
||||
execjs (2.0.2)
|
||||
foundation-icons-sass-rails (3.0.0)
|
||||
railties (>= 3.1.1)
|
||||
sass-rails (>= 3.1.1)
|
||||
foundation-rails (5.2.2.0)
|
||||
railties (>= 3.1.0)
|
||||
sass (>= 3.2.0)
|
||||
|
@ -108,6 +113,11 @@ GEM
|
|||
bundler (>= 1.3.0, < 2.0)
|
||||
railties (= 4.1.0)
|
||||
sprockets-rails (~> 2.0)
|
||||
rails_12factor (0.0.2)
|
||||
rails_serve_static_assets
|
||||
rails_stdout_logging
|
||||
rails_serve_static_assets (0.0.2)
|
||||
rails_stdout_logging (0.0.3)
|
||||
railties (4.1.0)
|
||||
actionpack (= 4.1.0)
|
||||
activesupport (= 4.1.0)
|
||||
|
@ -116,6 +126,27 @@ GEM
|
|||
rake (10.2.2)
|
||||
rdoc (4.1.1)
|
||||
json (~> 1.4)
|
||||
rspec (1.3.2)
|
||||
rspec-collection_matchers (0.0.4)
|
||||
rspec-expectations (>= 2.99.0.beta1)
|
||||
rspec-core (3.0.0.beta2)
|
||||
rspec-support (= 3.0.0.beta2)
|
||||
rspec-expectations (3.0.0.beta2)
|
||||
diff-lcs (>= 1.2.0, < 2.0)
|
||||
rspec-support (= 3.0.0.beta2)
|
||||
rspec-mocks (3.0.0.beta2)
|
||||
rspec-support (= 3.0.0.beta2)
|
||||
rspec-rails (3.0.0.beta2)
|
||||
actionpack (>= 3.0)
|
||||
activemodel (>= 3.0)
|
||||
activesupport (>= 3.0)
|
||||
railties (>= 3.0)
|
||||
rspec-collection_matchers
|
||||
rspec-core (= 3.0.0.beta2)
|
||||
rspec-expectations (= 3.0.0.beta2)
|
||||
rspec-mocks (= 3.0.0.beta2)
|
||||
rspec-support (= 3.0.0.beta2)
|
||||
rspec-support (3.0.0.beta2)
|
||||
sass (3.2.19)
|
||||
sass-rails (4.0.3)
|
||||
railties (>= 4.0.0, < 5.0)
|
||||
|
@ -125,6 +156,11 @@ GEM
|
|||
sdoc (0.4.0)
|
||||
json (~> 1.8)
|
||||
rdoc (~> 4.0, < 5.0)
|
||||
simplecov (0.8.2)
|
||||
docile (~> 1.1.0)
|
||||
multi_json
|
||||
simplecov-html (~> 0.8.0)
|
||||
simplecov-html (0.8.0)
|
||||
slop (3.5.0)
|
||||
sprockets (2.11.0)
|
||||
hike (~> 1.2)
|
||||
|
@ -153,8 +189,9 @@ PLATFORMS
|
|||
ruby
|
||||
|
||||
DEPENDENCIES
|
||||
coffee-rails (~> 4.0.0)
|
||||
coffee-rails
|
||||
devise!
|
||||
foundation-icons-sass-rails
|
||||
foundation-rails
|
||||
high_voltage
|
||||
jbuilder (~> 1.2)
|
||||
|
@ -162,6 +199,10 @@ DEPENDENCIES
|
|||
mongoid (~> 4.0.0.beta1)!
|
||||
pry
|
||||
rails (= 4.1.0)
|
||||
sass-rails (~> 4.0.0)
|
||||
rails_12factor
|
||||
rspec
|
||||
rspec-rails (~> 3.0.0.beta)
|
||||
sass-rails
|
||||
sdoc
|
||||
uglifier (>= 1.3.0)
|
||||
simplecov
|
||||
uglifier
|
||||
|
|
|
@ -13,3 +13,4 @@
|
|||
|
||||
*= require_tree .
|
||||
*/
|
||||
@import 'foundation-icons';
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,51 +1,72 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<%= favicon_link_tag 'favicon.png' %>
|
||||
<title>
|
||||
<%=content_for?(:title) ? yield(:title) : "FarmBot" %>
|
||||
</title>
|
||||
|
||||
<title><%= content_for?(:title) ? yield(:title) : "FarmBot" %></title>
|
||||
<%=stylesheet_link_tag "application" %>
|
||||
<%=javascript_include_tag "vendor/modernizr" %>
|
||||
<%=csrf_meta_tags %>
|
||||
</head>
|
||||
|
||||
<%= stylesheet_link_tag "application" %>
|
||||
<%= javascript_include_tag "vendor/modernizr" %>
|
||||
<%= csrf_meta_tags %>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!-- TODO: Style the alert dialogs -->
|
||||
<nav class="top-bar" data-topbar>
|
||||
<ul class="title-area">
|
||||
<li class="name">
|
||||
<h1><a href="#">Farmbot</a></h1>
|
||||
</li>
|
||||
<li class="toggle-topbar menu-icon"><a href="#">Menu</a></li>
|
||||
</ul>
|
||||
|
||||
<section class="top-bar-section">
|
||||
<!-- Right Nav Section -->
|
||||
<ul class="right">
|
||||
<li class="has-dropdown">
|
||||
<a href="#">Welcome, Rory!</a>
|
||||
<ul class="dropdown">
|
||||
<li><a href="#">Account Settings</a></li>
|
||||
<body>
|
||||
<nav class="top-bar" data-topbar="">
|
||||
<ul class="title-area">
|
||||
<li class="name">
|
||||
<h1><a href="#">Farmbot</a>
|
||||
</h1>
|
||||
</li>
|
||||
<li class="toggle-topbar menu-icon"><a href="#">Menu</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#">Logout</a></li>
|
||||
</ul>
|
||||
<section class="top-bar-section">
|
||||
<!-- Right Nav Section -->
|
||||
<ul class="right">
|
||||
<li><a href="http://foundation.zurb.com/docs" class="button">Send Data to Farmbot</a>
|
||||
</li>
|
||||
<li class="has-dropdown not-click">
|
||||
<a href="#">Welcome Ghislaine!</a>
|
||||
<ul class="dropdown">
|
||||
<li class="title back js-generated">
|
||||
<h5><a href="javascript:void(0)">Back</a>
|
||||
</h5>
|
||||
</li>
|
||||
<li><a href="#">Logout</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- Left Nav Section -->
|
||||
<ul class="left">
|
||||
<li class="active"><a href="#">Dashboard</a>
|
||||
</li>
|
||||
<li><a href="#">Farm</a>
|
||||
</li>
|
||||
<li><a href="#">Data</a>
|
||||
</li>
|
||||
<li><a href="#">Help</a>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
</nav>
|
||||
<div class="container">
|
||||
</div>
|
||||
</div>
|
||||
<p class="notice">
|
||||
<%= notice %>
|
||||
</p>
|
||||
<p class="alert">
|
||||
<%= alert %>
|
||||
</p>
|
||||
<div class="content">
|
||||
<%= yield %>
|
||||
<%= javascript_include_tag "application" %>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
<!-- Left Nav Section -->
|
||||
<ul class="left">
|
||||
<li class="active"><a href="#">Dashboard</a></li>
|
||||
<li><a href="#">Farm</a></li>
|
||||
<li><a href="#">Data</a></li>
|
||||
<li><a href="#">Help</a></li>
|
||||
</ul>
|
||||
</section>
|
||||
</nav>
|
||||
|
||||
<p class="notice"><%= notice %></p>
|
||||
<p class="alert"><%= alert %></p>
|
||||
<%= yield %>
|
||||
<%= javascript_include_tag "application" %>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
|
|
@ -1,61 +1,49 @@
|
|||
|
||||
<div class="row">
|
||||
<div class="large-6 columns">
|
||||
<h4>Farmbot</h4>
|
||||
|
||||
<!-- accordion-->
|
||||
<dl class="accordion" data-accordion>
|
||||
<dd>
|
||||
<a href="#panel1">Genesis Tracks</a>
|
||||
<div id="panel1" class="content active">
|
||||
<div class="large-12 columns">
|
||||
<h1>Create your Farmbot Account</h1>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="large-6 columns">
|
||||
<ul>
|
||||
<li>Model: Genesis Tracks</li>
|
||||
<li>Lenght</li>
|
||||
<li>Width</li>
|
||||
<li>Height</li>
|
||||
<li>Installation Date</li>
|
||||
<li>Graphically Design your farm or garden with drag and drop plants and operations.</li>
|
||||
<li>Adjust grow settings for maximum efficiency.</li>
|
||||
<li>Analyze data maps for data-driven design.</li>
|
||||
<li>View and edit scheduled operations.</li>
|
||||
<li>Communicate with your FarmBot.</li>
|
||||
</ul>
|
||||
</div>
|
||||
</dd>
|
||||
<dd>
|
||||
<a href="#panel2">Genesis Gantry</a>
|
||||
<div id="panel2" class="content">
|
||||
|
||||
<div class="large-6 columns">
|
||||
<div class="signup-panel">
|
||||
<p class="welcome"> Create your Account</p>
|
||||
<form>
|
||||
<div class="row collapse">
|
||||
<div class="small-2 columns">
|
||||
<span class="prefix"><i class="fi-torso-female"></i></span>
|
||||
</div>
|
||||
<div class="small-10 columns">
|
||||
<input type="text" placeholder="username">
|
||||
</div>
|
||||
</div>
|
||||
<div class="row collapse">
|
||||
<div class="small-2 columns">
|
||||
<span class="prefix"><i class="fi-mail"></i></span>
|
||||
</div>
|
||||
<div class="small-10 columns">
|
||||
<input type="text" placeholder="email">
|
||||
</div>
|
||||
</div>
|
||||
<div class="row collapse">
|
||||
<div class="small-2 columns ">
|
||||
<span class="prefix"><i class="fi-lock"></i></span>
|
||||
</div>
|
||||
<div class="small-10 columns ">
|
||||
<input type="text" placeholder="password">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<a href="#" class="button ">Next Step</a>
|
||||
<p>Already have an account? <a href="#">Login here »</a></p>
|
||||
</div><!--end signup form-->
|
||||
</div>
|
||||
</dd>
|
||||
<dd>
|
||||
<a href="#panel3">Richmond Cross-Slide</a>
|
||||
<div id="panel3" class="content">
|
||||
|
||||
</div>
|
||||
</dd>
|
||||
<dd>
|
||||
<a href="#panel3">Custom Tool Mount</a>
|
||||
<div id="panel3" class="content">
|
||||
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<!-- /accordion-->
|
||||
|
||||
<h4>Tools</h4>
|
||||
<h4>Sensors</h4>
|
||||
</div>
|
||||
<div class="large-6 columns">
|
||||
<h4>Resource Usage</h4>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="large-6 columns">
|
||||
<h4>System Information</h4>
|
||||
<h4>Manual Control</h4>
|
||||
</div>
|
||||
|
||||
<div class="large-6 columns">
|
||||
<h4>Finances</h4>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
|
@ -0,0 +1,61 @@
|
|||
|
||||
<div class="row">
|
||||
<div class="large-6 columns">
|
||||
<h4>Farmbot</h4>
|
||||
|
||||
<!-- accordion-->
|
||||
<dl class="accordion" data-accordion>
|
||||
<dd>
|
||||
<a href="#panel1">Genesis Tracks</a>
|
||||
<div id="panel1" class="content active">
|
||||
<ul>
|
||||
<li>Model: Genesis Tracks</li>
|
||||
<li>Lenght</li>
|
||||
<li>Width</li>
|
||||
<li>Height</li>
|
||||
<li>Installation Date</li>
|
||||
</ul>
|
||||
</div>
|
||||
</dd>
|
||||
<dd>
|
||||
<a href="#panel2">Genesis Gantry</a>
|
||||
<div id="panel2" class="content">
|
||||
|
||||
</div>
|
||||
</dd>
|
||||
<dd>
|
||||
<a href="#panel3">Richmond Cross-Slide</a>
|
||||
<div id="panel3" class="content">
|
||||
|
||||
</div>
|
||||
</dd>
|
||||
<dd>
|
||||
<a href="#panel3">Custom Tool Mount</a>
|
||||
<div id="panel3" class="content">
|
||||
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
<!-- /accordion-->
|
||||
|
||||
<h4>Tools</h4>
|
||||
<h4>Sensors</h4>
|
||||
</div>
|
||||
<div class="large-6 columns">
|
||||
<h4>Resource Usage</h4>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="large-6 columns">
|
||||
<h4>System Information</h4>
|
||||
<h4>Manual Control</h4>
|
||||
</div>
|
||||
|
||||
<div class="large-6 columns">
|
||||
<h4>Finances</h4>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
@ -0,0 +1 @@
|
|||
{"files":{"application-b81874aa4742630e90f85302d7d157a5.js":{"logical_path":"application.js","mtime":"2014-04-09T06:46:42-07:00","size":472015,"digest":"b81874aa4742630e90f85302d7d157a5"},"application-fb5d5882d2454c02f49dfdf56b313722.css":{"logical_path":"application.css","mtime":"2014-03-31T06:17:07-07:00","size":438310,"digest":"fb5d5882d2454c02f49dfdf56b313722"},"vendor/modernizr-41eb398b16ec9c9d5be903b14ad8b06c.js":{"logical_path":"vendor/modernizr.js","mtime":"2014-04-26T20:18:11-07:00","size":51325,"digest":"41eb398b16ec9c9d5be903b14ad8b06c"}},"assets":{"application.js":"application-b81874aa4742630e90f85302d7d157a5.js","application.css":"application-fb5d5882d2454c02f49dfdf56b313722.css","vendor/modernizr.js":"vendor/modernizr-41eb398b16ec9c9d5be903b14ad8b06c.js"}}
|
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
After Width: | Height: | Size: 7.3 KiB |
|
@ -0,0 +1,4 @@
|
|||
<?xml version="1.0" standalone="yes"?>
|
||||
|
||||
<svg version="1.1" viewBox="0.0 0.0 274.0 274.0" fill="none" stroke="none" stroke-linecap="square" stroke-miterlimit="10" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><clipPath id="p.0"><path d="m0 0l274.0 0l0 274.0l-274.0 0l0 -274.0z" clip-rule="nonzero"></path></clipPath><g clip-path="url(#p.0)"><path fill="#000000" fill-opacity="0.0" d="m0 0l274.57742 0l0 274.10236l-274.57742 0z" fill-rule="nonzero"></path><path fill="#316318" d="m242.54068 211.16011l0 14.718033l-105.244095 33.78589l-105.24408 -33.78589l0 -14.718033z" fill-rule="nonzero"></path><path stroke="#316318" stroke-width="24.0" stroke-linejoin="round" stroke-linecap="butt" d="m242.54068 211.16011l0 14.718033l-105.244095 33.78589l-105.24408 -33.78589l0 -14.718033z" fill-rule="nonzero"></path><path fill="#783f04" d="m242.75066 62.934383l0 -13.995205l-105.46457 -34.63472l-105.46457 34.63472l0 13.995205z" fill-rule="nonzero"></path><path stroke="#783f04" stroke-width="24.0" stroke-linejoin="round" stroke-linecap="butt" d="m242.75066 62.934383l0 -13.995205l-105.46457 -34.63472l-105.46457 34.63472l0 13.995205z" fill-rule="nonzero"></path><path fill="#b7b7b7" d="m19.792614 62.939632l234.99213 0l0 148.22047l-234.99213 0z" fill-rule="nonzero"></path><path fill="#000000" d="m20.14927 62.299126l234.24213 0l0 0l-234.24213 0zm0 149.50146l234.24213 0l0 0l-234.24213 0z" fill-rule="nonzero"></path><path stroke="#000000" stroke-width="16.0" stroke-linejoin="round" stroke-linecap="butt" d="m20.14927 62.299126l234.24213 0l0 0l-234.24213 0zm0 149.50146l234.24213 0l0 0l-234.24213 0z" fill-rule="nonzero"></path><path fill="#999999" d="m19.813744 70.28609l0 66.83464l234.96063 -66.83464z" fill-rule="nonzero"></path><path fill="#000000" fill-opacity="0.0" d="m19.792643 72.22835l234.99213 0l0 129.63779l-234.99213 0z" fill-rule="nonzero"></path><path fill="#000000" d="m71.51386 141.29723q-7.718746 1.0625 -12.765621 1.0625q-1.734375 0 -1.734375 -1.328125q0 -3.0625 4.1875 -6.453125q4.187496 -3.390625 13.640621 -5.921875q4.25 -15.156242 9.703125 -27.796867q-13.296875 0.65625 -21.812496 8.78125q-2.125 2.125 -3.453125 3.328125q-1.328125 1.1875 -2.328125 1.1875q-1.0 0 -1.9375 -1.59375q-0.921875 -1.59375 -0.921875 -4.25q0.125 -10.25 13.828121 -16.625q13.703125 -6.390625 33.78125 -6.25l39.906258 0.65625q3.578125 0 3.578125 2.796875q0 0.796875 -1.0625 2.859375q-1.0625 2.0625 -1.859375 4.453125q-1.734375 4.78125 -7.453125 4.78125l-4.25 0l-17.687508 -0.125l-10.234375 0q-1.078125 7.578125 -6.390625 24.734375l24.34375 0.40625q2.125 0 2.125 2.5156174q0 0.796875 -0.671875 2.796875q-0.65625 2.0 -1.1875 4.125q-1.0625 4.390625 -4.53125 4.390625l-20.21875 -0.9375l-1.71875 0q-0.796875 0 -1.859375 0.140625q-6.921875 25.40625 -6.921875 40.15625q0 7.859375 -15.296875 7.859375q-3.328125 0 -3.921875 -3.390625q-0.59375 -3.390625 -0.59375 -8.984375q0 -11.96875 5.71875 -33.375zm110.84083 -2.9375q-12.90625 0 -12.640625 -6.515625q0 -6.1093674 12.375 -6.1093674q2.921875 0 5.578125 0.65625q4.390625 -4.390625 4.390625 -13.296875q0 -15.421875 -20.609375 -15.421875q-10.78125 0 -20.484375 4.65625q-3.59375 1.71875 -6.453125 3.1875q-2.859375 1.453125 -5.25 1.453125q-2.390625 0 -2.390625 -1.453125q0 -1.734375 2.65625 -5.125q2.65625 -3.390625 7.453125 -6.84375q12.234375 -8.515625 27.796875 -8.65625q20.34375 0 29.921875 8.125q8.25 6.78125 8.25 18.484375q0 13.5625 -13.3125 20.749992q12.78125 7.3125 15.171875 17.953125q0.796875 3.71875 0.796875 9.84375q0 6.109375 -3.328125 11.5625q-3.328125 5.453125 -8.90625 9.1875q-11.171875 7.171875 -28.59375 7.171875q-12.375 0 -27.53125 -5.578125q-10.109375 -3.734375 -14.90625 -8.921875q-2.390625 -2.515625 -2.328125 -5.046875q0.078125 -2.53125 2.53125 -2.53125q2.46875 0 9.375 1.734375l0 -0.140625q0 -10.375 2.390625 -21.28125q4.125 -19.015617 9.578125 -29.781242q5.859375 -11.96875 12.109375 -11.96875q1.734375 0 1.734375 5.984375q0 5.984375 -1.140625 12.234375q-1.125 6.2499924 -2.390625 12.312492q-1.265625 6.046875 -2.40625 10.96875q-1.125 4.90625 -1.125 7.046875l-1.328125 20.078125q7.859375 2.125 13.3125 2.125q5.453125 0 9.828125 -1.859375q11.046875 -4.65625 11.046875 -16.234375q0 -6.90625 -1.328125 -11.421875q-1.328125 -4.53125 -4.796875 -7.984375q-3.046875 0.65625 -5.046875 0.65625z" fill-rule="nonzero"></path></g></svg>
|
||||
|
After Width: | Height: | Size: 4.2 KiB |
|
@ -0,0 +1,9 @@
|
|||
require 'spec_helper'
|
||||
|
||||
describe User do
|
||||
describe '#new' do
|
||||
it 'Creates a new user' do
|
||||
expect(User.new).to be_kind_of(User)
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,31 @@
|
|||
require 'simplecov'
|
||||
#Ignore anything with the word 'spec' in it. No need to test your tests.
|
||||
SimpleCov.start{ add_filter '/spec/' }
|
||||
require 'pry'
|
||||
# This file is copied to spec/ when you run 'rails generate rspec:install'
|
||||
ENV["RAILS_ENV"] ||= 'test'
|
||||
require File.expand_path("../../config/environment", __FILE__)
|
||||
require 'rspec/rails'
|
||||
|
||||
# Requires supporting ruby files with custom matchers and macros, etc, in
|
||||
# spec/support/ and its subdirectories. Files matching `spec/**/*_spec.rb` are
|
||||
# run as spec files by default. This means that files in spec/support that end
|
||||
# in _spec.rb will both be required and run as specs, causing the specs to be
|
||||
# run twice. It is recommended that you do not name files matching this glob to
|
||||
# end with _spec.rb. You can configure this pattern with with the --pattern
|
||||
# option on the command line or in ~/.rspec, .rspec or `.rspec-local`.
|
||||
Dir[Rails.root.join("spec/support/**/*.rb")].each { |f| require f }
|
||||
|
||||
RSpec.configure do |config|
|
||||
|
||||
config.after do
|
||||
Mongoid.purge!
|
||||
end
|
||||
|
||||
config.order = "random"
|
||||
end
|
||||
|
||||
# Moped was making the test output buffer look ugly every time the database was
|
||||
# purged. These settings stop that.
|
||||
Mongoid.logger.level = Logger::WARN
|
||||
Moped.logger.level = Logger::WARN
|
Loading…
Reference in New Issue