summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHombreLaser <sebastian-440@live.com>2023-02-21 19:12:36 -0600
committerHombreLaser <sebastian-440@live.com>2023-02-21 19:12:36 -0600
commit1edd911e4292a98c309391a119467e55a509d7b0 (patch)
tree693e53c2b3120fbb31f91ba857bfdbc14c677a23
parentdeaf74104dfeecec4704a4af82837bbcb737c71d (diff)
Añade shoulda matchers
-rw-r--r--db/schema.rb24
-rw-r--r--spec/rails_helper.rb9
2 files changed, 32 insertions, 1 deletions
diff --git a/db/schema.rb b/db/schema.rb
new file mode 100644
index 0000000..6948e6b
--- /dev/null
+++ b/db/schema.rb
@@ -0,0 +1,24 @@
+# This file is auto-generated from the current state of the database. Instead
+# of editing this file, please use the migrations feature of Active Record to
+# incrementally modify your database, and then regenerate this schema definition.
+#
+# This file is the source Rails uses to define your schema when running `bin/rails
+# db:schema:load`. When creating a new database, `bin/rails db:schema:load` tends to
+# be faster and is potentially less error prone than running all of your
+# migrations from scratch. Old migrations may fail to apply correctly if those
+# migrations use external dependencies or application code.
+#
+# It's strongly recommended that you check this file into your version control system.
+
+ActiveRecord::Schema[7.0].define(version: 2023_02_22_010138) do
+ create_table "user_accounts", charset: "utf8mb4", collation: "utf8mb4_general_ci", force: :cascade do |t|
+ t.string "email"
+ t.string "password_digest"
+ t.string "first_name"
+ t.string "last_name"
+ t.string "session_key"
+ t.datetime "created_at", null: false
+ t.datetime "updated_at", null: false
+ end
+
+end
diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb
index a53bdba..0624d3e 100644
--- a/spec/rails_helper.rb
+++ b/spec/rails_helper.rb
@@ -3,7 +3,7 @@ require 'spec_helper'
ENV['RAILS_ENV'] ||= 'test'
require_relative '../config/environment'
# Prevent database truncation if the environment is production
-abort("The Rails environment is running in production mode!") if Rails.env.production?
+abort('The Rails environment is running in production mode!') if Rails.env.production?
require 'rspec/rails'
# Add additional requires below this line. Rails is not loaded until this point!
@@ -61,3 +61,10 @@ RSpec.configure do |config|
# arbitrary gems may also be filtered via:
# config.filter_gems_from_backtrace("gem name")
end
+
+Shoulda::Matchers.configure do |config|
+ config.integrate do |with|
+ with.test_framework :rspec
+ with.library :rails
+ end
+end