-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmusic_lesson_spec.rb
26 lines (22 loc) · 1.05 KB
/
music_lesson_spec.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
require 'spec_helper'
describe MusicLesson do
subject(:music_lesson) {MusicLesson.create(
points: 10, level: 10, global_level: 1, img: "http://google.com/me.jpg",
lesson_text: "This is a test for music",
question_text: "What are we testing today?",
solution_key_pattern: "B5, H6, I7",
category: "Scales",
title: "Major Scale",
level: 1,
global_level: 1,
solution_key_pattern: "B5, H6, I7")}
it { should validate_presence_of :points}
it { should validate_presence_of :level}
it { should validate_presence_of :img}
it { should validate_presence_of :lesson_text}
it { should validate_presence_of :question_text}
it { should validate_presence_of :solution_key_pattern}
it { should validate_presence_of :category}
it { should validate_presence_of :title}
it { should have_and_belong_to_many(:users) }
end