Skip to content

Instantly share code, notes, and snippets.

require 'rails_helper'
RSpec.describe Wiki, type: :model do
let(:wiki) {Wiki.create!(title: "New Wiki Title", body: "New Wiki Body", private: "true", belongs_to :user)}
describe "attributes" do
it "has title, body, private, and user attributes" do
expect(wiki).to have_attributes(title: "New Wiki Title", body: "New Wiki Body", private: "true", belongs_to :user)
end
ec2-user:~/environment/bloccit (topics_and_post_assignment) $ rspec spec/controllers/sponsored_posts_controller_spec.rb
DEPRECATION WARNING: ActiveSupport.halt_callback_chains_on_return_false= is deprecated and will be removed in Rails 5.2. (called from <top (required)> at /home/ec2-user/environment/bloccit/config/initializers/new_framework_defaults.rb:21)
FFFFFFFFF
Failures:
1) SponsoredPostsController GET edit returns http success
Failure/Error: get :edit, params: { topic_id: my_topic.id, id: my_post.id }
ActionController::UnknownFormat:
[4] pry(#<Post>):1> nesting
Nesting status:
--
0. main (Pry top level)
1. #<Post>
[5] pry(#<Post>):1> self.to_s
=> "#<Post:0x0000000003430aa0>"
[6] pry(#<Post>):1> self.title = 'ORM Exercise"
[6] pry(#<Post>):1* self.title = 'ORM Exercise'
SyntaxError: unexpected tCONSTANT, expecting end-of-input
  1. This file declares a class, Player, instantiates it, and assigns it to a global player variable.
  2. The Player class contains four methods:
    • constructor()
    • playPause()
    • skipTo()
    • setVolume()
  3. The constructor() method sets initial values for the currentlyPlaying, playState, volume, and soundObject properties.
    • currentlyPlaying is set to the first item in album.songs.
    • The initial playState is "stopped".
  • The volume is set to the number 80.
let toDos = 0;
function onReady() {
let toDos = [];
const addToDoForm = document.getElementById('addToDoForm');
const newToDoText = document.getElementById('newToDoText');
const toDoList = document.getElementById('toDoList');
renderTheUI();
let toDos = [];
window.onload = function () {
alert("The window has loaded!");
onReady();
}
function onReady() {
let toDos = [];
function onReady() {
console.log("ready");
let id = 0;
const addToDoForm = document.getElementById('addToDoForm');
const newToDoText = document.getElementById('newToDoText');
const toDolist = document.getElementById('toDoList');
let toDos = [];
function onReady() {
let id = 0;
const addToDoForm = document.getElementById('addToDoForm');
const newToDoText = document.getElementById('newToDoText');
const toDolist = document.getElementById('toDoList');
function createNewToDo() {
let toDos = [];
function onReady() {
let id = 0;
const addToDoForm = document.getElementById('addToDoForm');
const newToDoText = document.getElementById('newToDoText');
const toDolist = document.getElementById('toDoList');
function createNewToDo() {
if (!newToDoText.value) {return; }
let toDos = [];
function onReady() {
let id = 0;
const addToDoForm = document.getElementByid('addToDoForm');
const newToDoText = document.getElementByid('newToDoText');
const toDolist = document.getElementByid('toDoList');
function createNewToDo() {