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
# create rvmrc file | |
create_file ".rvmrc", "rvm 1.9.2@#{app_name}" | |
gem "haml-rails" | |
# hpricot and ruby_parser required by haml | |
gem "hpricot", :group => :development | |
gem "ruby_parser", :group => :development | |
gem "nifty-generators" | |
gem "simple_form" | |
gem "jquery-rails" |
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
using System; | |
using FileHelpers; | |
using NUnit.Framework; | |
namespace FileHelpers.Tests.Converters | |
{ | |
[TestFixture] | |
public class RecordStringConverter.cs | |
{ | |
FileHelperEngine<UserRecord> engine = new FileHelperEngine<UserRecord>(); |
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
(::) failed steps (::) | |
Validation failed: Start at can't be blank, End at can't be blank (ActiveRecord::RecordInvalid) | |
./features/step_definitions/view_calendar_steps.rb:7:in `block (2 levels) in <top (required)>' | |
./features/step_definitions/view_calendar_steps.rb:6:in `each' | |
./features/step_definitions/view_calendar_steps.rb:6:in `/^I have an Event with the following attributes:$/' | |
features/view_calendar_detail.feature:8:in `Given I have an Event with the following attributes:' |
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
declare @DateRemovedUTC datetime,@DateRemovedTimeZoneLookupID tinyint,@DateRemovedByID bigint,@IsAssigned bit,@PositionID6 bigint,@PositionID1 bigint,@ExtendedPropertyID2 int,@PositionID3 bigint,@IsExclusion4 bit,@IsCurriculumExcluded5 bit | |
select @DateRemovedUTC='2011-01-14 22:56:19',@DateRemovedTimeZoneLookupID=43,@DateRemovedByID=1,@IsAssigned=0,@PositionID6=70,@PositionID1=70,@ExtendedPropertyID2=6,@PositionID3=70,@IsExclusion4=0,@IsCurriculumExcluded5=0 | |
UPDATE [Cognition].[dbo].[PositionUsers] SET [DateRemovedUTC]=@DateRemovedUTC,[DateRemovedTimeZoneLookupID]=@DateRemovedTimeZoneLookupID,[DateRemovedByID]=@DateRemovedByID,[IsAssigned]=@IsAssigned FROM ( (SELECT DISTINCT | |
[Cognition].[dbo].[Users].[UserID] FROM (((( [Cognition].[dbo].[Users] INNER JOIN [Cognition].[dbo].[PositionFilterDivision] [LPA_P3] ON | |
[Cognition].[dbo].[Users].[DivisionID] = [LPA_P3].[DivisionID]) INNER JOIN [Cognition].[dbo].[PositionFilter] [LPA_P2] ON [LPA_P2].[ID]=[LPA_P3].[ID]) INNER JOIN | |
[Cognition].[dbo].[PositionFilter |
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
[Test] | |
public void FailWhenTheFirstNameIsTooLong() | |
{ | |
var svc = new UserImportValidationService(_userRepo, _divRepo, _jcRepo, _locRepo); | |
var user = new UserRecord(); | |
user.UserLoginID = "VALID"; | |
user.FirstName = "This is really long and shouldn't be imported because we said that the first name and last name fields should only be less than 50 characters. It's pretty arbitrary, but that's what the database can hold so that's why we're doing it that way. Groundhog Day was a sweet movie."; | |
Validation val = svc.IsValid(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
Feature: Contact Form | |
In order to provide feedback | |
As a user | |
I want to contact the website owners online | |
Scenario: Submitting with valid information | |
Given I am on the contact page | |
When I fill in "Name" with "Steve Perry" | |
And I fill in "Email" with "test@example.com" |
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
<div id="content"> | |
<section class="pages"> | |
<section class="full_page"> | |
<h1>Login to the Website</h1> | |
<form> | |
.... | |
</form> | |
</section> | |
</section> | |
</div> |
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
Imports System.Data.SqlClient | |
Imports System.Collections.Generic | |
Imports SD.LLBLGen.Pro.ORMSupportClasses | |
Public Interface ISqlBulkCopyWrapper | |
Sub WriteToServer(ByVal destTableName As String, ByVal table As DataTable, ByVal mappings As IEnumerable(Of SqlBulkCopyColumnMapping), ByRef tran As ITransaction) | |
End Interface | |
Public Class SqlBulkCopyWrapper | |
Implements ISqlBulkCopyWrapper |
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
public bool IsValidSmallDateTime(DateTime date) | |
{ | |
return date >= Convert.ToDateTime("1/1/1900") || date <= Convert.ToDateTime("6/6/2079"); | |
} |