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, ".add_reputation via voting" do | |
before(:each) do | |
@user = User.new | |
@user.reputation.should == 1 | |
end | |
it "adds one rep" do | |
@user.add_reputation(:voting) |
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
1) DestinationsController GET index assigns all destinations as @destinations | |
Failure/Error: get :index | |
bad argument(expected URI object or URI string) | |
# ./spec/requests/destinations_controller.spec:14:in `block (3 levels) in <top (required)>' |
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 System.Collections; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Threading; | |
using Dimebrain.TweetSharp.Extensions; | |
using Dimebrain.TweetSharp.Fluent; | |
using Dimebrain.TweetSharp.Model; | |
using NHibernate; | |
using NHibernate.Criterion; |
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
$(document).ready(function() { | |
$('.edit_area').editable('/fragments/1/save', { | |
loadurl : '/fragments/1/load_markup', | |
type : 'textarea', | |
cancel : 'Cancel', | |
submit : 'OK', | |
onblur : 'submit', | |
indicator : '<img src="/assets/rails.png">', | |
tooltip : 'Click to edit...' | |
}); |
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 class Order | |
{ | |
public int OrderId {get; private set;} | |
public List<Orderlines> Orderlines {get; private set;} | |
} | |
public class Orderline | |
{ | |
public string Item {get; private set;} | |
public int Quantity {get;private set;} |
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
# How do I return 'data' as the result of save_it ? | |
save_it = (edited_value, s) -> | |
$.post(url_to_save_to, {value: edited_value}, (data) -> data) |
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 (new TimeIt()) { command.Execute(); } | |
public class TimeIt : IDisposable | |
{ | |
private readonly TextWriter output; | |
private readonly Stopwatch watch; | |
public TimeIt() : this(Console.Out) {} | |
public TimeIt(TextWriter output) |
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 Database SqlServerCe and Connection String Data Source=Database1.sdf | |
BUILD FAILED | |
INTERNAL ERROR | |
System.Data.SqlServerCe.SqlCeException: Unable to load the native components of SQL Server Compact corresponding to the ADO.NET provider of version 84 | |
82. Install the correct version of SQL Server Compact. Refer to KB article 974247 for more details. | |
at System.Data.SqlServerCe.NativeMethods.LoadNativeBinaries() | |
at System.Data.SqlServerCe.SqlCeConnection..ctor() |
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
Buildfile: file:///C:/dev2/fmce/src/FluentMigrator.Example/example-nant.build | |
Target framework: Microsoft .NET Framework 3.5 | |
Target(s) specified: migrate | |
[loadtasks] Scanning assembly "FluentMigrator.NAnt" for extensions. | |
migrate: | |
Using Database SqlServerCe and Connection String Data Source=Database1.sdf | |
-- Beginning Transaction |
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
CanCreateTable : FailedSetUp : System.BadImageFormatException : is not a valid Win32 application. (Exception from HRESULT: 0x800700C1) | |
TearDown : System.NullReferenceException : Object reference not set to an instance of an object. | |
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo) | |
at System.Data.SqlServerCe.UnmanagedLibraryHelper..ctor(String fileName) | |
at System.Data.SqlServerCe.NativeMethodsHelper..ctor(String modulePath) | |
at System.Data.SqlServerCe.NativeMethods.LoadValidLibrary(String modulePath) | |
at System.Data.SqlServerCe.NativeMethods.LoadNativeBinariesFromPrivateFolder(String privateInstall) | |
at System.Data.SqlServerCe.NativeMethods.LoadNativeBinaries() | |
at System.Data.SqlServerCe.SqlCeEngine..ctor() | |
at System.Data.SqlServerCe.SqlCeEngine..ctor(String connectionString) |