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
expect{ | |
User.authenticate(user.email,invalid_password) | |
}.to change{ | |
# *user* is not changed! | |
# i have to a) | |
User.first(:email => user.email).last_failed_login_attempt_at | |
# or b) | |
#user.reload | |
# user.last_.... |
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
require "dm_spec" | |
require 'dm-core' | |
require 'dm-migrations' | |
require 'dm-types' | |
require 'dm-validations' | |
require 'dm-timestamps' |
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
before :create do | |
@temp_tx = DataMapper::Transaction.new(Friendship) | |
@temp_tx.begin | |
end | |
after :create do | |
(@temp_tx.rollback and throw :halt) if some_conditions | |
@temp_tx.commit | |
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
require "dm_spec" | |
require 'dm-core' | |
require 'dm-migrations' | |
require 'dm-types' | |
require 'dm-validations' | |
require 'dm-timestamps' |
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
require "dm_spec" | |
require 'dm-core' | |
require 'dm-migrations' | |
require 'dm-types' | |
require 'dm-validations' | |
require 'dm-timestamps' |
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
source 'http://rubygems.org' | |
gem 'rails', '3.1.1' | |
gem 'sqlite3' | |
DM_VERSION = '~> 1.2.0' | |
gem 'dm-rails', DM_VERSION | |
gem 'dm-sqlite-adapter', DM_VERSION |
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
object A1 { val X = B1.Y } | |
object B1 { val Y :Int = A1.X } | |
println(A1.X) | |
object A2 { val X = B2.Y+1 } | |
object B2 { val Y :Int = A2.X*2 } | |
println(A2.X) |
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 'shared context and its' do | |
shared_context :shared => :ctx do | |
before{ puts 'before';raise if @x; @x = true } | |
end | |
describe 'failing', :shared => :ctx do | |
its(:length){} | |
it(:ok){} | |
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
module X | |
C = 1 | |
end | |
describe 'Test' do | |
include X | |
it '...' do | |
p C | |
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
rm -r output | |
mkdir -p output/objects | |
mkdir -p output/image/boot/grub | |
ldc2 -de -enable-asserts -enable-color -enable-preconditions -disable-red-zone -enable-contracts -nogc -w -m64 -boundscheck=off -relocation-model=pic -c source/kernel.d -c source/types.d -c source/string.d -c source/vga_terminal.d -odoutput/objects | |
nasm -f elf64 source/boot_header.asm -o output/objects/boot_header.o && | |
nasm -f elf64 source/boot.asm -o output/objects/boot.o && | |
ld -nostdlib -nodefaultlibs -n -o output/image/boot/kernel.bin -T source/linker.ld output/objects/boot_header.o output/objects/boot.o output/objects/kernel.o output/objects/string.o output/objects/vga_terminal.o output/objects/types.o && | |
cp source/grub.cfg output/image/boot/grub/ && | |
grub-mkrescue -o output/image.iso output/image |
OlderNewer