Browse files

added RSpec and Shoulda. Tested User

  • Loading branch information...
1 parent ab73a50 commit 1effbf460dea6b7e441991bc1de83ce622d96dd4 @supermarin supermarin committed Nov 24, 2012
Showing with 108 additions and 1,349 deletions.
  1. +2 −0 .gitignore
  2. +3 −0 .rspec
  3. +5 −0 Gemfile
  4. +20 −0 Gemfile.lock
  5. +0 −1,349 selfstarter.sublime-workspace
  6. +27 −0 spec/fixtures/orders.yml
  7. +7 −0 spec/fixtures/users.yml
  8. +6 −0 spec/models/user_spec.rb
  9. +38 −0 spec/spec_helper.rb
View
2 .gitignore
@@ -17,3 +17,5 @@
config/settings.local.yml
config/settings/*.local.yml
config/environments/*.local.yml
+
+*.sublime-workspace
View
3 .rspec
@@ -0,0 +1,3 @@
+-fp
+--color
+--require spec_helper
View
5 Gemfile
@@ -20,6 +20,11 @@ group :assets do
gem 'uglifier', '>= 1.0.3'
end
+group :development, :test do
+ gem 'rspec-rails', '~> 2.0'
+ gem 'shoulda'
+end
+
# jQuery
gem 'jquery-rails'
View
20 Gemfile.lock
@@ -42,6 +42,7 @@ GEM
execjs
coffee-script-source (1.3.3)
daemons (1.1.9)
+ diff-lcs (1.1.3)
erubis (2.7.0)
eventmachine (1.0.0)
execjs (1.4.0)
@@ -92,11 +93,28 @@ GEM
json (~> 1.4)
rest-client (1.6.7)
mime-types (>= 1.16)
+ rspec-core (2.12.0)
+ rspec-expectations (2.12.0)
+ diff-lcs (~> 1.1.3)
+ rspec-mocks (2.12.0)
+ rspec-rails (2.12.0)
+ actionpack (>= 3.0)
+ activesupport (>= 3.0)
+ railties (>= 3.0)
+ rspec-core (~> 2.12.0)
+ rspec-expectations (~> 2.12.0)
+ rspec-mocks (~> 2.12.0)
sass (3.2.1)
sass-rails (3.2.5)
railties (~> 3.2.0)
sass (>= 3.1.10)
tilt (~> 1.3)
+ shoulda (3.3.2)
+ shoulda-context (~> 1.0.1)
+ shoulda-matchers (~> 1.4.1)
+ shoulda-context (1.0.1)
+ shoulda-matchers (1.4.1)
+ activesupport (>= 3.0.0)
sprockets (2.1.3)
hike (~> 1.2)
rack (~> 1.0)
@@ -128,7 +146,9 @@ DEPENDENCIES
pg
rails (= 3.2.8)
rails_config
+ rspec-rails (~> 2.0)
sass-rails (~> 3.2.3)
+ shoulda
sqlite3
therubyracer
thin
View
1,349 selfstarter.sublime-workspace
@@ -1,1349 +0,0 @@
-{
- "auto_complete":
- {
- "selected_items":
- [
- [
- "gray",
- "gray_background_bottom_color"
- ],
- [
- "gray_b",
- "gray_background_top_color"
- ],
- [
- "gray_back",
- "gray_background"
- ],
- [
- "gray_backgrou",
- "gray_background_top_color"
- ],
- [
- "verif",
- "verified_orders"
- ],
- [
- "lockitron",
- "lockitron_down"
- ],
- [
- "acc",
- "access_notification"
- ],
- [
- "calcul",
- "calculating_revenue"
- ],
- [
- "preord",
- "preorders"
- ],
- [
- "preorder",
- "preorder_revenue"
- ],
- [
- "javas",
- "javascript_include_tag"
- ],
- [
- "new_",
- "new_with_permission"
- ],
- [
- "visib",
- "visibility"
- ],
- [
- "styles",
- "stylesheet_link_tag"
- ],
- [
- "curr",
- "current_application"
- ],
- [
- "cur",
- "current_resource_owner"
- ],
- [
- "w",
- "when when …"
- ],
- [
- "OPENC",
- "OPENCV_DIRECTORY"
- ],
- [
- "OpENCV",
- "OPENCV_DIRECTORY"
- ],
- [
- "regis",
- "registered_device_and_request_avatar"
- ],
- [
- "H",
- "HASNT_STARTED_YET"
- ],
- [
- "NOT",
- "NOT_ALLOWED_TO_EDIT_KEY"
- ],
- [
- "NOT_",
- "NOT_PERMISSABLE"
- ],
- [
- "editee",
- "editee_key"
- ],
- [
- "invit",
- "inviting_self_by_email"
- ],
- [
- "invitin",
- "inviting_self_by_phone"
- ],
- [
- "inviting",
- "inviting_self_by_email"
- ],
- [
- "invite_via",
- "invite_via_email_and_phone_with_sms"
- ],
- [
- "passwor",
- "password_confirmation"
- ],
- [
- "with",
- "without_protection"
- ],
- [
- "registered",
- "registered_device"
- ],
- [
- "create",
- "create_new_user_and_register_device"
- ],
- [
- "def",
- "def def … end"
- ],
- [
- "owner",
- "owner_key"
- ],
- [
- "pass",
- "password_confirmation"
- ],
- [
- "password",
- "password"
- ],
- [
- "find",
- "find_by_device_id"
- ],
- [
- "user",
- "user_details"
- ],
- [
- "avatar",
- "avatar_upload_form"
- ],
- [
- "JAR",
- "JARRED_FACEBOOK_SECRET"
- ],
- [
- "FACE",
- "FACEBOOK_SECRET"
- ],
- [
- "FACEB",
- "FACEBOOK_KEY"
- ],
- [
- "curre",
- "current_application"
- ],
- [
- "di",
- "DIV Tag"
- ],
- [
- "gue",
- "guest_two"
- ],
- [
- "passw",
- "password_confirmation"
- ],
- [
- "permiss",
- "permission_k"
- ],
- [
- "doork",
- "doorkeeper_from_uid"
- ],
- [
- "curren",
- "current_resource_owner"
- ],
- [
- "for",
- "forgot"
- ],
- [
- "resource",
- "resource_owner_id"
- ],
- [
- "opt",
- "opts_or_token"
- ],
- [
- "argum",
- "arguments_list"
- ],
- [
- "redirec",
- "redirect_uri"
- ],
- [
- "oauth_authoriza",
- "oauth_authorization_codes"
- ],
- [
- "sor",
- "sorb sort_by { |e| .. }"
- ],
- [
- "format",
- "format_start_time"
- ],
- [
- "uuid",
- "UUID"
- ],
- [
- "cl",
- "cla class BlankSlate .. initialize .. end"
- ],
- [
- "long",
- "longitude"
- ],
- [
- "bor",
- "border-bottom"
- ],
- [
- "curl",
- "closing_curly_braces"
- ],
- [
- "lines",
- "lines_as_char_array"
- ],
- [
- "open",
- "opening_curly_braces"
- ],
- [
- "http",
- "http_start_index"
- ],
- [
- "httt",
- "http_start_index"
- ],
- [
- "htt",
- "http_start_index"
- ],
- [
- "start",
- "start_index"
- ],
- [
- "proc",
- "process_server_blocks"
- ],
- [
- "line",
- "line_with_block_type"
- ],
- [
- "find_h",
- "find_http_block_start"
- ],
- [
- "read",
- "read_lines"
- ],
- [
- "home",
- "home_ending_from"
- ]
- ]
- },
- "buffers":
- [
- ],
- "build_system": "",
- "command_palette":
- {
- "height": 67.0,
- "selected_items":
- [
- [
- "markdown",
- "Set Syntax: Markdown"
- ],
- [
- "html",
- "Set Syntax: HTML (Rails)"
- ],
- [
- "ruby",
- "Set Syntax: Ruby"
- ],
- [
- "bash",
- "Set Syntax: Shell Script (Bash)"
- ],
- [
- "objec",
- "Set Syntax: Objective-C"
- ],
- [
- "objecti",
- "Set Syntax: Objective-C"
- ],
- [
- "b",
- "BeautifyRuby"
- ],
- [
- "beau",
- "BeautifyRuby"
- ],
- [
- "install",
- "Package Control: Install Package"
- ],
- [
- "html rails",
- "Set Syntax: HTML (Rails)"
- ],
- [
- "javascript",
- "Set Syntax: JavaScript"
- ],
- [
- "coffee",
- "Set Syntax: CoffeeScript"
- ],
- [
- "css",
- "Set Syntax: CSS"
- ],
- [
- "objective",
- "Set Syntax: Objective-C"
- ],
- [
- "object",
- "Set Syntax: Objective-C"
- ],
- [
- "less",
- "Set Syntax: LESS"
- ],
- [
- "scss",
- "Set Syntax: SCSS"
- ],
- [
- "Markdown",
- "Set Syntax: Markdown"
- ],
- [
- "json",
- "Set Syntax: JSON"
- ],
- [
- "xml",
- "Set Syntax: XML"
- ],
- [
- "snippet",
- "Snippet: #include <…>"
- ],
- [
- "sni",
- "Snippet: main()"
- ],
- [
- "Objec",
- "Set Syntax: Objective-C"
- ],
- [
- "",
- "About"
- ]
- ],
- "width": 566.0
- },
- "console":
- {
- "height": 139.0
- },
- "distraction_free":
- {
- "menu_visible": true,
- "show_minimap": false,
- "show_open_files": false,
- "show_tabs": false,
- "side_bar_visible": false,
- "status_bar_visible": false
- },
- "file_history":
- [
- "/Users/jarred/Code/Selfstarter/app/views/preorder/homepage/_key_points.html.erb",
- "/Users/jarred/Code/Selfstarter/app/assets/javascripts/preorder.js.coffee",
- "/Users/jarred/Code/Selfstarter/app/assets/stylesheets/homepage/stats.css.scss",
- "/Users/jarred/Code/Selfstarter/app/models/order.rb",
- "/Users/jarred/Code/Selfstarter/app/assets/stylesheets/homepage/faq.css.scss",
- "/Users/jarred/Code/Selfstarter/config/settings.yml",
- "/Users/jarred/Code/Selfstarter/app/assets/stylesheets/primitives.css.scss",
- "/Users/jarred/Code/Selfstarter/app/assets/stylesheets/application.css",
- "/Users/jarred/Code/Selfstarter/app/views/preorder/homepage/_show_dont_tell.html.erb",
- "/Users/jarred/Code/Selfstarter/app/views/preorder/index.html.erb",
- "/Users/jarred/Code/Selfstarter/app/views/preorder/_footer.html.erb",
- "/Users/jarred/Code/Selfstarter/app/views/layouts/application.html.erb",
- "/Users/jarred/Code/Selfstarter/app/views/preorder/homepage/_faqs.html.erb",
- "/Users/jarred/Code/Selfstarter/app/views/preorder/homepage/_stats.html.erb",
- "/Users/jarred/Code/Selfstarter/app/views/preorder/homepage/_middle_reserve.html.erb",
- "/Users/jarred/Code/Selfstarter/config/locales/en.yml",
- "/Users/jarred/Code/Selfstarter/app/views/preorder/_google_analytics.html.erb",
- "/Users/jarred/Code/Selfstarter/config/database.yml",
- "/Users/jarred/Code/Selfstarter/README.rdoc",
- "/Users/jarred/Code/Selfstarter/app/helpers/preorder_helper.rb",
- "/Users/jarred/Code/Selfstarter/Gemfile",
- "/Users/jarred/Code/Selfstarter/Procfile",
- "/Users/jarred/Code/Selfstarter/app/assets/stylesheets/main.css.scss",
- "/Users/jarred/Code/Selfstarter/app/views/preorder/_copyright.html.erb",
- "/Users/jarred/Desktop/settings.yml",
- "/Users/jarred/Code/Selfstarter/config/environments/production.rb",
- "/Users/jarred/Code/Selfstarter/app/assets/stylesheets/variables.css.scss",
- "/Users/jarred/Code/Selfstarter/config/application.rb",
- "/Users/jarred/Code/Selfstarter/config.ru",
- "/Users/jarred/Library/Application Support/Sublime Text 2/Packages/User/Preferences.sublime-settings",
- "/Users/jarred/Code/Selfstarter/app/assets/stylesheets/share.css.scss",
- "/Users/jarred/Code/Selfstarter/app/assets/stylesheets/homepage/key_points.css.scss",
- "/Users/jarred/Code/Selfstarter/app/helpers/application_helper.rb",
- "/Users/jarred/Code/Selfstarter/app/views/preorder/share.html.erb",
- "/Users/jarred/Code/Selfstarter/db/migrate/20121004072706_create_orders.rb",
- "/Users/jarred/Code/Selfstarter/config/routes.rb",
- "/Users/jarred/Code/Selfstarter/app/controllers/preorder_controller.rb",
- "/Users/jarred/Code/Selfstarter/config/initializers/rails_config.rb",
- "/Users/jarred/Code/Selfstarter/app/views/preorder/share/_facebook_js.html.erb",
- "/Users/jarred/Code/Selfstarter/app/views/preorder/share/_twitter_js.html.erb",
- "/Users/jarred/Code/Lockitron/Rails/app/views/preorder/buy.html.erb",
- "/Users/jarred/Code/Selfstarter/db/schema.rb",
- "/Users/jarred/Code/Selfstarter/app/assets/stylesheets/homepage.css.scss",
- "/Users/jarred/Code/Selfstarter/app/views/preorder/_header.html.erb",
- "/Users/jarred/Code/Selfstarter/app/views/preorder/checkout.html.erb",
- "/Users/jarred/Code/Lockitron/Rails/config/initializers/amazon_payments.rb",
- "/Users/jarred/Code/Selfstarter/config/initializers/amazon_flexible_payments.rb",
- "/Users/jarred/Code/Selfstarter/config/settings.local.yml",
- "/Users/jarred/Code/Selfstarter/app/views/preorder/homepage/_value_proposition.html.erb",
- "/Users/jarred/Code/Selfstarter/app/assets/javascripts/application.js",
- "/Users/jarred/Code/Selfstarter/app/assets/stylesheets/checkout.css.scss",
- "/Users/jarred/Code/Selfstarter/app/assets/stylesheets/homepage/call_to_action.css.scss",
- "/Users/jarred/Code/Selfstarter/app/assets/stylesheets/footer.css.scss",
- "/Users/jarred/Code/Selfstarter/app/assets/stylesheets/header.css.scss",
- "/Users/jarred/Code/Selfstarter/app/assets/stylesheets/homepage/other_points.css.scss",
- "/Users/jarred/Code/Selfstarter/app/views/preorder/_press.html.erb",
- "/Users/jarred/Code/Selfstarter/app/views/preorder/_show_dont_tell.html.erb",
- "/Users/jarred/Code/Selfstarter/app/views/preorder/_stats.html.erb",
- "/Users/jarred/Code/Selfstarter/app/views/preorder/_value_proposition.html.erb",
- "/Users/jarred/Code/Selfstarter/app/views/preorder/_middle_reserve.html.erb",
- "/Users/jarred/Code/Selfstarter/app/views/preorder/_faqs.html.erb",
- "/Users/jarred/Code/Selfstarter/app/assets/stylesheets/stats.css.scss",
- "/Users/jarred/Code/Selfstarter/app/assets/stylesheets/call_to_action.css.scss",
- "/Users/jarred/Code/Selfstarter/app/assets/stylesheets/faq.css.scss",
- "/Users/jarred/Code/Selfstarter/app/assets/stylesheets/reminder_modal.css.scss",
- "/Users/jarred/Code/Selfstarter/app/views/preorder/checkout/_sidebar.html.erb",
- "/Users/jarred/Code/Selfstarter/app/assets/stylesheets/other_points.css.scss",
- "/Users/jarred/Code/Selfstarter/app/views/preorder/_other_points.html.erb",
- "/Users/jarred/Code/Selfstarter/app/views/preorder/_key_points.html.erb",
- "/Users/jarred/Code/Selfstarter/app/assets/stylesheets/key_points.css.scss",
- "/Users/jarred/Code/Selfstarter/app/assets/stylesheets/press.css.scss",
- "/Users/jarred/Code/Lockitron/Rails/app/controllers/preorder_controller.rb",
- "/Users/jarred/Code/Lockitron/Rails/app/views/preorder/index.html.erb",
- "/Users/jarred/Code/Selfstarter/app/views/preorder/checkout/untitled",
- "/Users/jarred/Code/Lockitron/Rails/app/assets/javascripts/preorder.js.coffee",
- "/Users/jarred/Code/Selfstarter/app/models/user.rb",
- "/Users/jarred/Code/Lockitron/Rails/app/models/order.rb",
- "/Users/jarred/Code/Selfstarter/app/views/layouts/_footer.html.erb",
- "/Users/jarred/Code/Selfstarter/app/views/layouts/_header.html.erb",
- "/Users/jarred/Code/Selfstarter/app/assets/stylesheets/reset.css",
- "/Users/jarred/Code/Selfstarter/app/assets/stylesheets/preorder.css.scss",
- "/Users/jarred/Desktop/verifier.rb",
- "/Users/jarred/Code/Selfstarter/app/controllers/application_controller.rb",
- "/Users/jarred/Code/Selfstarter/app/views/preorder/get_excited.html.erb",
- "/Users/jarred/Code/Lockitron/Rails/db/schema.rb",
- "/Users/jarred/Code/Lockitron/Rails/config/routes.rb",
- "/Users/jarred/Code/Lockitron/Rails/Gemfile",
- "/Users/jarred/Code/Lockitron/Rails/config/initializers/kaminari.rb",
- "/Users/jarred/Code/Lockitron/Rails/app/views/preorder/reserved.text.erb",
- "/Users/jarred/Code/Lockitron/Rails/app/views/admin/metrics/preorder.html.erb",
- "/Users/jarred/Code/Lockitron/Rails/log/development.log",
- "/Users/jarred/Code/Lockitron/Rails/config/initializers/rails_admin.rb",
- "/Users/jarred/Code/Lockitron/Rails/bin/wkhtmltopdf-amd64",
- "/Users/jarred/Code/Lockitron/Rails/app/controllers/admin/permissions_controller.rb",
- "/Users/jarred/Code/Lockitron/Rails/app/controllers/dashboard_controller.rb",
- "/Users/jarred/Code/Lockitron/Rails/app/helpers/metrics_helper.rb",
- "/Users/jarred/Code/Lockitron/Rails/app/controllers/admin/metrics_controller.rb",
- "/Users/jarred/Code/Lockitron/Rails/lib/key_management.rb",
- "/Users/jarred/Code/Lockitron/Rails/config/initializers/will_paginate.rb",
- "/Users/jarred/Code/Lockitron/Rails/app/admin/users.rb",
- "/Users/jarred/Code/Lockitron/Rails/app/controllers/home_controller.rb",
- "/Users/jarred/Code/Lockitron/Rails/app/assets/stylesheets/application.css",
- "/Users/jarred/Code/Lockitron/Rails/app/models/user.rb",
- "/Users/jarred/Code/Lockitron/Rails/app/models/notifier.rb",
- "/Users/jarred/Code/Lockitron/Rails/app/views/admin/orders/show.html.erb",
- "/Users/jarred/Code/Lockitron/Rails/app/controllers/admin/logs_controller.rb",
- "/Users/jarred/Code/Lockitron/Rails/app/controllers/admin/orders_controller.rb",
- "/Users/jarred/Code/Lockitron/Rails/app/views/admin/orders/index.html.erb",
- "/Users/jarred/Code/Lockitron/Rails/config/deploy.rb",
- "/Users/jarred/Code/Lockitron/Rails/app/controllers/admin/contact_controller.rb",
- "/Users/jarred/Code/Lockitron/Rails/app/controllers/sms/sms_controller.rb",
- "/Users/jarred/Code/Lockitron/Rails/app/views/preorder/welcome.html.erb",
- "/Users/jarred/Code/Lockitron/Rails/app/views/notifier/reserve_lockitron.text.erb",
- "/Users/jarred/Code/Lockitron/Rails/app/assets/stylesheets/preorder/main.css.scss",
- "/Users/jarred/Code/Lockitron/Rails/app/controllers/new_store_controller.rb",
- "/Users/jarred/Code/Lockitron/Rails/lib/root_domain.rb",
- "/Users/jarred/Code/Lockitron/Rails/app/views/preorder/reserved.erb",
- "/Users/jarred/Code/Lockitron/Rails/app/mailers/preorder.rb",
- "/Users/jarred/Code/Lockitron/Rails/config/database.yml",
- "/Users/jarred/Code/Lockitron/Rails/config/environments/development.rb",
- "/Users/jarred/Code/Lockitron/Rails/config/initializers/omniauth.rb",
- "/Users/jarred/Code/Lockitron/Rails/app/views/layouts/admin/orders.html.erb",
- "/Users/jarred/Code/Lockitron/Rails/app/controllers/application_controller.rb",
- "/Users/jarred/Code/Lockitron/Rails/app/views/layouts/application.html.erb",
- "/Users/jarred/Code/Lockitron/Rails/app/models/facebook.rb",
- "/Users/jarred/Code/Lockitron/Rails/app/views/preorder/_header.html.erb",
- "/Users/jarred/Code/Lockitron/Rails/app/views/preorder/_subscribe.html.erb",
- "/Users/jarred/Code/Lockitron/Rails/app/assets/images/field.gif"
- ],
- "find":
- {
- "height": 33.0
- },
- "find_in_files":
- {
- "height": 0.0,
- "where_history":
- [
- "",
- "$primary_font, $secondary_font, $tertiary_font;",
- ""
- ]
- },
- "find_state":
- {
- "case_sensitive": false,
- "find_history":
- [
- "lockitron",
- "state",
- "address_two",
- "address_one",
- "cost",
- "\"ProximaNova-Semibold\", \"Helvetica Neue\", Helvetica, Arial, \"Lucida Grande\", sans-serif;\n font-family: \"ProximaNova-Semibold\", \"Helvetica Neue\", Helvetica, Arial, \"Lucida Grande\", sans-serif;\n\"ProximaNova-Semibold\", \"Helvetica Neue\", Helvetica, Arial, \"Lucida Grande\", sans-serif;",
- "ProximaNova\n font-family: \"ProximaNova-Semibold\", \"Helvetica Neue\", Helvetica, Arial, \"Lucida Grande\", sans-serif;\n\"ProximaNova-Semibold\", \"Helvetica Neue\", Helvetica, Arial, \"Lucida Grande\", sans-serif;",
- "\"ProximaNova-Semibold\", \"Helvetica Neue\", Helvetica, Arial, \"Lucida Grande\", sans-serif;\n font-family: \"ProximaNova-Semibold\", \"Helvetica Neue\", Helvetica, Arial, \"Lucida Grande\", sans-serif;\n\"ProximaNova-Semibold\", \"Helvetica Neue\", Helvetica, Arial, \"Lucida Grande\", sans-serif;",
- " font-family: \"ProximaNova-Semibold\", \"Helvetica Neue\", Helvetica, Arial, \"Lucida Grande\", sans-serif;\n font-family: \"ProximaNova-Semibold\", \"Helvetica Neue\", Helvetica, Arial, \"Lucida Grande\", sans-serif;\n\"ProximaNova-Semibold\", \"Helvetica Neue\", Helvetica, Arial, \"Lucida Grande\", sans-serif;",
- "#F6F6F6",
- "$gray_background_top_color",
- "h2",
- "h4",
- "#backers",
- ".stats",
- "#login",
- "reserve",
- "devise",
- "forgot",
- "authenticate",
- "log",
- "'Log",
- "result",
- "order",
- "admin/",
- "admin",
- ":preorder",
- "invite_via_email",
- "notifier",
- ".round(4)",
- "customer_id",
- "Preorder.delay.reserved",
- "country",
- "bar",
- "@@backers",
- "count",
- "calculate",
- "revenue",
- "launch",
- "amount",
- "role",
- "HEAD",
- "<<",
- "else",
- "reminded",
- "opacity",
- "rgba",
- "logos",
- "#logos",
- "#update",
- "pipe",
- "mount",
- "price",
- "cost",
- "keep",
- "absolute",
- "relative",
- "header",
- "update",
- "remind",
- "#login",
- "login_butt",
- "password",
- "register",
- ":password",
- "new",
- "index",
- "help",
- "twitter",
- "update",
- "phone",
- "current_user",
- "#email",
- "#faqs ul",
- "details",
- ".active_faq",
- "reserve",
- "details",
- "a",
- "ul li a",
- "current_user",
- "reserve",
- "image-path",
- "../images/",
- "image",
- "1.png",
- "protect",
- "invite",
- "email",
- "tron",
- "permissible",
- "logs_for",
- "is_valid",
- "save_edit",
- "save_ed",
- "save",
- "saved_edited_key",
- "edit",
- "outcome",
- "user_ide",
- "started_rece",
- "visible",
- "is_valid",
- "email",
- "def create",
- ":key",
- ":new_key",
- ":key",
- "options[:start",
- "create_user_with_email",
- "def index",
- "Not Found",
- "RoutingError",
- "Not Found",
- "alert",
- "found",
- "404",
- "invite",
- "permissions_owners",
- "owner",
- "\"guest\"",
- "rvm",
- "capistrano",
- "printDiag",
- "log_changes",
- "params[:exp",
- "exp",
- "edit"
- ],
- "highlight": true,
- "in_selection": false,
- "preserve_case": false,
- "regex": false,
- "replace_history":
- [
- "$gray_background_top_color",
- "",
- "image-path(\"",
- "CANT_MODIFY_SELF",
- "cant_modify_self!",
- "@",
- "=",
- "",
- "oil_rubbed_bronze",
- "antique_brass",
- "polished_brass",
- "current_resource_owner",
- "div",
- "Session",
- "session",
- "@session",
- "v1",
- "@response",
- "",
- ":methods => :is_valid",
- "permission.is_valid",
- "permission.owner?",
- "permission.guest?",
- "permission.admin?",
- "valid?",
- "admin?",
- "valid?",
- "#flash",
- "flash.now[:notice]",
- "flash.now[:error]",
- " <div class=\"location\">in <a class='map' href=\"#\">New York City <div class='link_indicator'> »</div></a></div>",
- "<div class=\"location\">in <a class='map' href=\"#\">New York City<div class='link_indicator'> »</div>",
- "",
- "<a class=\"email_user\" href=\"mailto:jarred@jarredsumner.com?&subject=Hello from Lockitron&body=I am going to figure out an actual template later.\" target='new'>",
- "",
- "<a class=\"person unselectable\" href=\"mailto:jarred@jarredsumner.com?&subject=\"Hello from Lockitron\"&body=\"I\"m going to figure out an actual template later.\">",
- "<div class=\"person unselectable\">",
- "<div class=\"person unselectable",
- "#",
- " ",
- "gsub",
- "part"
- ],
- "reverse": false,
- "show_context": true,
- "use_buffer2": true,
- "whole_word": false,
- "wrap": false
- },
- "groups":
- [
- {
- "sheets":
- [
- ]
- },
- {
- "sheets":
- [
- ]
- }
- ],
- "incremental_find":
- {
- "height": 0.0
- },
- "input":
- {
- "height": 32.0
- },
- "layout":
- {
- "cells":
- [
- [
- 0,
- 0,
- 1,
- 1
- ],
- [
- 1,
- 0,
- 2,
- 1
- ]
- ],
- "cols":
- [
- 0.0,
- 0.5,
- 1.0
- ],
- "rows":
- [
- 0.0,
- 1.0
- ]
- },
- "menu_visible": true,
- "output.exec":
- {
- "height": 110.0
- },
- "replace":
- {
- "height": 62.0
- },
- "save_all_on_build": true,
- "select_file":
- {
- "height": 0.0,
- "selected_items":
- [
- [
- "_middle",
- "app/views/preorder/homepage/_middle_reserve.html.erb"
- ],
- [
- "_stats",
- "app/views/preorder/homepage/_stats.html.erb"
- ],
- [
- ".yml",
- "config/locales/en.yml"
- ],
- [
- "datab",
- "config/database.yml"
- ],
- [
- "settings",
- "config/settings.yml"
- ],
- [
- "_goo",
- "app/views/preorder/_google_analytics.html.erb"
- ],
- [
- "_show",
- "app/views/preorder/homepage/_show_dont_tell.html.erb"
- ],
- [
- "index.",
- "app/views/preorder/index.html.erb"
- ],
- [
- "readme",
- "README.rdoc"
- ],
- [
- "setting",
- "config/settings.yml"
- ],
- [
- "procfile",
- "Procfile"
- ],
- [
- "gemfile",
- "Gemfile"
- ],
- [
- "main.css",
- "app/assets/stylesheets/main.css.scss"
- ],
- [
- "_footer",
- "app/views/preorder/_footer.html.erb"
- ],
- [
- "application.html",
- "app/views/layouts/application.html.erb"
- ],
- [
- "_faq",
- "app/views/preorder/homepage/_faqs.html.erb"
- ],
- [
- "preorder_helper",
- "app/helpers/preorder_helper.rb"
- ],
- [
- "order.rb",
- "app/models/order.rb"
- ],
- [
- "key",
- "app/views/preorder/homepage/_key_points.html.erb"
- ],
- [
- "production.rb",
- "config/environments/production.rb"
- ],
- [
- "variable",
- "app/assets/stylesheets/variables.css.scss"
- ],
- [
- "stats.css",
- "app/assets/stylesheets/homepage/stats.css.scss"
- ],
- [
- "preorder.js",
- "app/assets/javascripts/preorder.js.coffee"
- ],
- [
- "order",
- "app/models/order.rb"
- ],
- [
- "config.yml",
- "config/database.yml"
- ],
- [
- "config",
- "config.ru"
- ],
- [
- "faq.css",
- "app/assets/stylesheets/homepage/faq.css.scss"
- ],
- [
- "_middl",
- "app/views/preorder/homepage/_middle_reserve.html.erb"
- ],
- [
- "primitves",
- "app/assets/stylesheets/primitives.css.scss"
- ],
- [
- "aplication.css",
- "app/assets/stylesheets/application.css"
- ],
- [
- "variabl",
- "app/assets/stylesheets/variables.css.scss"
- ],
- [
- "pplication.rb",
- "config/application.rb"
- ],
- [
- "application.rb",
- "config/application.rb"
- ],
- [
- "application_helper",
- "app/helpers/application_helper.rb"
- ],
- [
- "key_",
- "app/assets/stylesheets/homepage/key_points.css.scss"
- ],
- [
- "rails_c",
- "config/initializers/rails_config.rb"
- ],
- [
- "helper",
- "app/helpers/preorder_helper.rb"
- ],
- [
- "share.css",
- "app/assets/stylesheets/share.css.scss"
- ],
- [
- "share",
- "app/views/preorder/share.html.erb"
- ],
- [
- "preorder_",
- "app/controllers/preorder_controller.rb"
- ],
- [
- "routes",
- "config/routes.rb"
- ],
- [
- "schema",
- "db/schema.rb"
- ],
- [
- "create_orders",
- "db/migrate/20121004072706_create_orders.rb"
- ],
- [
- "create_order",
- "db/migrate/20121004072706_create_orders.rb"
- ],
- [
- "var",
- "app/assets/stylesheets/variables.css.scss"
- ],
- [
- "preorder",
- "app/controllers/preorder_controller.rb"
- ],
- [
- "checkout",
- "app/views/preorder/checkout.html.erb"
- ],
- [
- "_helper",
- "app/helpers/preorder_helper.rb"
- ],
- [
- "share.html",
- "app/views/preorder/share.html.erb"
- ],
- [
- "key_poi",
- "app/assets/stylesheets/homepage/key_points.css.scss"
- ],
- [
- "homepage.css",
- "app/assets/stylesheets/homepage.css.scss"
- ],
- [
- "settings.local",
- "config/settings.local.yml"
- ],
- [
- "_header",
- "app/views/preorder/_header.html.erb"
- ],
- [
- "_value",
- "app/views/preorder/homepage/_value_proposition.html.erb"
- ],
- [
- "index",
- "app/views/preorder/index.html.erb"
- ],
- [
- "settings.yml",
- "config/settings.yml"
- ],
- [
- "application.css",
- "app/assets/stylesheets/application.css"
- ],
- [
- "varia",
- "app/assets/stylesheets/variables.css.scss"
- ],
- [
- "application.js",
- "app/assets/javascripts/application.js"
- ],
- [
- "header.html",
- "app/views/preorder/_header.html.erb"
- ],
- [
- "primitives",
- "app/assets/stylesheets/primitives.css.scss"
- ],
- [
- "homepage",
- "app/assets/stylesheets/homepage/faq.css.scss"
- ],
- [
- "checkout.css",
- "app/assets/stylesheets/checkout.css.scss"
- ],
- [
- ".css",
- "app/assets/stylesheets/homepage/key_points.css.scss"
- ],
- [
- "call_to",
- "app/assets/stylesheets/homepage/call_to_action.css.scss"
- ],
- [
- "homepage.",
- "app/assets/stylesheets/homepage.css.scss"
- ],
- [
- "scss",
- "app/assets/stylesheets/share.css.scss"
- ],
- [
- "index.html",
- "app/views/preorder/index.html.erb"
- ],
- [
- "homepa.",
- "app/assets/stylesheets/homepage.css.scss"
- ],
- [
- "footer.css",
- "app/assets/stylesheets/footer.css.scss"
- ],
- [
- "header.css",
- "app/assets/stylesheets/header.css.scss"
- ],
- [
- "primi",
- "app/assets/stylesheets/primitives.css.scss"
- ],
- [
- "other",
- "app/assets/stylesheets/homepage/other_points.css.scss"
- ],
- [
- "homepage/",
- "app/assets/stylesheets/homepage/faq.css.scss"
- ],
- [
- "_google",
- "app/views/preorder/_google_analytics.html.erb"
- ],
- [
- "_press",
- "app/views/preorder/_press.html.erb"
- ],
- [
- "_faqs",
- "app/views/preorder/_faqs.html.erb"
- ],
- [
- "call_t",
- "app/assets/stylesheets/call_to_action.css.scss"
- ],
- [
- "faq",
- "app/assets/stylesheets/faq.css.scss"
- ],
- [
- "_sidebar",
- "app/views/preorder/checkout/_sidebar.html.erb"
- ],
- [
- "other_points",
- "app/assets/stylesheets/other_points.css.scss"
- ],
- [
- "hare.css",
- "app/assets/stylesheets/share.css.scsss"
- ],
- [
- "primitive",
- "app/assets/stylesheets/primitives.css.scss"
- ],
- [
- "primite",
- "app/assets/stylesheets/primitives.css.scss"
- ],
- [
- "primitve",
- "app/assets/stylesheets/primitives.css.scss"
- ],
- [
- "order_contr",
- "app/controllers/preorder_controller.rb"
- ],
- [
- "user",
- "app/models/user.rb"
- ],
- [
- "user.rb",
- "app/models/user.rb"
- ],
- [
- "_fot",
- "app/views/preorder/_footer.html.erb"
- ],
- [
- "pplication.html",
- "app/views/layouts/application.html.erb"
- ],
- [
- "preorder.css",
- "app/assets/stylesheets/preorder.css.scss"
- ],
- [
- "pplication.css",
- "app/assets/stylesheets/application.css"
- ],
- [
- "appli",
- "app/views/layouts/application.html.erb"
- ],
- [
- "application_contr",
- "app/controllers/application_controller.rb"
- ],
- [
- "get_ex",
- "app/views/preorder/get_excited.html.erb"
- ],
- [
- "user_controller",
- "app/controllers/admin/users_controller.rb"
- ],
- [
- "admin/users/edit",
- "app/views/admin/users/edit.html.erb"
- ],
- [
- "application_c",
- "app/controllers/application_controller.rb"
- ],
- [
- "application",
- "app/assets/stylesheets/application.css"
- ],
- [
- "devel",
- "log/development.log"
- ],
- [
- "rails_admin",
- "config/initializers/rails_admin.rb"
- ],
- [
- "deve",
- "log/development.log"
- ],
- [
- "account_contr",
- "app/controllers/account_controller.rb"
- ],
- [
- "log",
- "app/models/log.rb"
- ],
- [
- "users.rb",
- "app/admin/users.rb"
- ],
- [
- "buy",
- "app/views/preorder/buy.html.erb"
- ],
- [
- "reserved",
- "app/views/preorder/reserved.text.erb"
- ],
- [
- "home_contr",
- "app/controllers/home_controller.rb"
- ],
- [
- "metrics_con",
- "app/controllers/admin/metrics_controller.rb"
- ],
- [
- "metrics_c",
- "app/controllers/admin/metrics_controller.rb"
- ],
- [
- "metrics_helper",
- "app/helpers/metrics_helper.rb"
- ],
- [
- "key_man",
- "lib/key_management.rb"
- ],
- [
- "dashboard_con",
- "app/controllers/dashboard_controller.rb"
- ],
- [
- "notifier",
- "app/models/notifier.rb"
- ],
- [
- "permission_contro",
- "app/controllers/admin/permissions_controller.rb"
- ],
- [
- "reserved.text",
- "app/views/preorder/reserved.text.erb"
- ],
- [
- "preorder_con",
- "app/controllers/preorder_controller.rb"
- ],
- [
- "metrics_contr",
- "app/controllers/admin/metrics_controller.rb"
- ],
- [
- "orders/show",
- "app/views/admin/orders/show.html.erb"
- ],
- [
- "order/index.html",
- "app/views/admin/orders/index.html.erb"
- ],
- [
- "order_con",
- "app/controllers/admin/orders_controller.rb"
- ],
- [
- "order_contro",
- "app/controllers/preorder_controller.rb"
- ],
- [
- "show",
- "app/views/admin/orders/show.html.erb"
- ],
- [
- "deploy",
- "config/deploy.rb"
- ],
- [
- "preorder/index",
- "app/views/preorder/index.html.erb"
- ],
- [
- "preorder_c",
- "app/controllers/preorder_controller.rb"
- ],
- [
- "sms_contr",
- "app/controllers/sms/sms_controller.rb"
- ],
- [
- "amazon_",
- "config/initializers/amazon_payments.rb"
- ]
- ],
- "width": 0.0
- },
- "select_project":
- {
- "height": 0.0,
- "selected_items":
- [
- ],
- "width": 0.0
- },
- "show_minimap": false,
- "show_open_files": false,
- "show_tabs": true,
- "side_bar_visible": false,
- "side_bar_width": 211.0,
- "status_bar_visible": true
-}
View
27 spec/fixtures/orders.yml
@@ -0,0 +1,27 @@
+# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
+
+one:
+ token: MyString
+ transaction_id: MyString
+ address_one: MyString
+ address_two: MyString
+ city: MyString
+ state: MyString
+ zip: MyString
+ country: MyString
+ status: MyString
+ number: MyString
+ uuid: MyString
+
+two:
+ token: MyString
+ transaction_id: MyString
+ address_one: MyString
+ address_two: MyString
+ city: MyString
+ state: MyString
+ zip: MyString
+ country: MyString
+ status: MyString
+ number: MyString
+ uuid: MyString
View
7 spec/fixtures/users.yml
@@ -0,0 +1,7 @@
+# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
+
+one:
+ email: MyString
+
+two:
+ email: MyString
View
6 spec/models/user_spec.rb
@@ -0,0 +1,6 @@
+describe User do
+
+ it { should have_many :orders }
+ it { should respond_to :email }
+
+end
View
38 spec/spec_helper.rb
@@ -0,0 +1,38 @@
+# 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'
+require 'rspec/autorun'
+
+# Requires supporting ruby files with custom matchers and macros, etc,
+# in spec/support/ and its subdirectories.
+Dir[Rails.root.join("spec/support/**/*.rb")].each {|f| require f}
+
+RSpec.configure do |config|
+ # ## Mock Framework
+ #
+ # If you prefer to use mocha, flexmock or RR, uncomment the appropriate line:
+ #
+ # config.mock_with :mocha
+ # config.mock_with :flexmock
+ # config.mock_with :rr
+
+ # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
+ config.fixture_path = "#{::Rails.root}/spec/fixtures"
+
+ # If you're not using ActiveRecord, or you'd prefer not to run each of your
+ # examples within a transaction, remove the following line or assign false
+ # instead of true.
+ config.use_transactional_fixtures = true
+
+ # If true, the base class of anonymous controllers will be inferred
+ # automatically. This will be the default behavior in future versions of
+ # rspec-rails.
+ config.infer_base_class_for_anonymous_controllers = false
+
+ # Run specs in random order to surface order dependencies. If you find an
+ # order dependency and want to debug it, you can fix the order by providing
+ # the seed, which is printed after each run.
+ # --seed 1234
+ config.order = "random"
+end

0 comments on commit 1effbf4

Please sign in to comment.