Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
forki committed Oct 24, 2014
1 parent 18591b1 commit cf44b49
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions tests/Paket.Tests/DependenciesFile/AddPackageSpecs.fs
Original file line number Diff line number Diff line change
Expand Up @@ -120,32 +120,23 @@ nuget FAKE !~> 1.2"""


[<Test>]
let ``should fail if package already exists``() =
let ``should not fail if package already exists``() =
let config = """source http://nuget.org/api/v2
nuget Castle.Windsor-log4net ~> 3.2
nuget Rx-Main ~> 2.0
nuget FAKE = 1.1
nuget SignalR = 3.3.2"""

try
DependenciesFile.FromCode(config).Add("FAKE","") |> ignore
failwith "adding the same package did not throw"
with e ->
e.Message |> shouldEqual <| sprintf "%s has already package %s" Constants.DependenciesFile "FAKE"

DependenciesFile.FromCode(config).Add("FAKE","") |> ignore

[<Test>]
let ``should fail if package already exists - case insensitive``() =
let ``should not fail if package already exists - case insensitive``() =
let config = """source http://nuget.org/api/v2
nuget Castle.Windsor-log4net ~> 3.2
nuget Rx-Main ~> 2.0
nuget FAKE = 1.1
nuget SignalR = 3.3.2"""

try
DependenciesFile.FromCode(config).Add("fAKe","") |> ignore
failwith "adding the same package did not throw"
with e ->
e.Message |> shouldEqual <| sprintf "%s has already package %s" Constants.DependenciesFile "fAKe"
DependenciesFile.FromCode(config).Add("fAKe","") |> ignore

0 comments on commit cf44b49

Please sign in to comment.