This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ~/Projects/c++test # clang++ -std=c++11 test.cpp | |
| test.cpp:52:18: error: variable type 'AbstractPerson' is an abstract class | |
| AbstractPerson x = Teacher("Thomas"); | |
| ^ | |
| test.cpp:19:20: note: unimplemented pure virtual method '_getName' in 'AbstractPerson' | |
| virtual string _getName() = 0; | |
| ^ | |
| test.cpp:20:18: note: unimplemented pure virtual method '_isTeacher' in 'AbstractPerson' | |
| virtual bool _isTeacher() = 0; | |
| ^ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module WithContextsHelpers | |
| class WithContextsBuilder | |
| attr_accessor :contexts, :examples, :group | |
| def initialize(group) | |
| @contexts = {} | |
| @group = group | |
| end | |
| def context(name, &blk) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| describe FooClass do | |
| contexts do | |
| context "on tuesday" do | |
| let(:day) { "Tuesday" } | |
| end | |
| context "on saturday" do | |
| let(:day) { "Saturday" } | |
| end | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ~/Projects/better_matchers (*) # rvm gemset list | |
| gemsets for ruby-2.1.0 (found in /home/thomasfedb/.rvm/gems/ruby-2.1.0) | |
| => (default) | |
| better_matchers | |
| biblios | |
| global | |
| has_many_through | |
| rspec-expect_it |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Admin::UsersController < Admin::ApplicationController | |
| def index | |
| @users = policy_scope(User) | |
| end | |
| def new | |
| @user = User.new | |
| authorize @user | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class StaticsController < ApplicationController | |
| def about_us | |
| # render view | |
| end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| describe "#new" do | |
| subject { get :new, study_id: study.id } | |
| specify { expect_it.to be_successful } | |
| specify { expect_it.to assign(:instrument).with_a_new(Instrument) } | |
| describe_assign(:instrument) do | |
| specify { expect_its(:study_id).to eq study.id } | |
| end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| describe StudiesController do | |
| sign_in | |
| describe "#index" do | |
| let(:studies) { FactoryGirl.create_list :study, 3 } | |
| subject { get :index } | |
| specify { expect_it.to be_successful } | |
| specify { expect_it.to assign(:studies).with(studies) } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Biblios::Application.routes.draw do | |
| resource :dashboard, only: [:show] | |
| resource :session, only: [:new, :create, :destroy] | |
| resources :studies | |
| end |