This file contains 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 'spec_helper' | |
describe "User Pages" do | |
subject { page } | |
describe "index" do | |
let(:user) { FactoryGirl.create(:user) } | |
it { should have_selector('title', text: 'All scaffolds') } | |
it { should have_selector('h1', text: 'All scaffolds') } |
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Sporenstregs | All scaffolds</title> | |
<link href="/assets/application.css?body=1" media="all" rel="stylesheet" type="text/css" /> | |
<link href="/assets/custom.css?body=1" media="all" rel="stylesheet" type="text/css" /> | |
<link href="/assets/sessions.css?body=1" media="all" rel="stylesheet" type="text/css" /> | |
<link href="/assets/static_pages.css?body=1" media="all" rel="stylesheet" type="text/css" /> | |
<link href="/assets/tracks.css?body=1" media="all" rel="stylesheet" type="text/css" /> | |
<link href="/assets/users.css?body=1" media="all" rel="stylesheet" type="text/css" /> |
This file contains 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 'spec_helper' | |
describe "Scaffold pages" do | |
subject { page } | |
describe "index" do | |
let(:user) { FactoryGirl.create(:user) } | |
before do | |
sign_in user |
This file contains 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 'spec_helper' | |
describe "Scaffold pages" do | |
subject { page } | |
describe "index" do | |
let(:user) { FactoryGirl.create(:user) } | |
before do | |
sign_in user |
This file contains 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
FactoryGirl.define do | |
factory :user do | |
sequence(:name) { |n| "Person #{n}" } | |
sequence(:email) { |n| "person_#{n}@example.com"} | |
password "foobar" | |
password_confirmation "foobar" | |
factory :admin do | |
admin true | |
end |
This file contains 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 'spec_helper' | |
describe "Scaffold pages" do | |
subject { page } | |
describe "index" do | |
let(:user) { FactoryGirl.create(:user) } | |
before do | |
sign_in user |
This file contains 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
rake routes | |
user_scaffolds GET /users/:user_id/scaffolds(.:format) scaffolds#index | |
POST /users/:user_id/scaffolds(.:format) scaffolds#create | |
new_user_scaffold GET /users/:user_id/scaffolds/new(.:format) scaffolds#new | |
edit_user_scaffold GET /users/:user_id/scaffolds/:id/edit(.:format) scaffolds#edit | |
user_scaffold GET /users/:user_id/scaffolds/:id(.:format) scaffolds#show | |
PUT /users/:user_id/scaffolds/:id(.:format) scaffolds#update | |
DELETE /users/:user_id/scaffolds/:id(.:format) scaffolds#destroy | |
users GET /users(.:format) users#index | |
POST /users(.:format) users#create |
This file contains 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
#!/usr/bin/perl -w | |
use strict; | |
# Filenames | |
my $start10 = 'start10.dat'; | |
my $res10 = 'res10.dat'; | |
# Opening the files | |
open (START, '<', $start10) or die "Could not read file\n"; |
This file contains 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
my %names = (); | |
while (defined (my $line = <START>)) { | |
chomp $line; | |
$names{$line}; | |
} |
This file contains 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
#!/usr/bin/perl -w | |
use strict; | |
# Lea Benedicte Skov Hansen, Mar 2013 | |
# This program reads a table, sums the rows and create a histogram of the sums | |
my $input = 'test_count.txt'; #'count.matrix.ratio_new'; | |
my $output = 'row_sum_his.txt'; | |
my $interval = 5; |